Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can anyone tell how to Store data from QlikView input box to SQL when clicking Button object?
Hi,
&
https://community.qlik.com/docs/DOC-5970
Refer this links you will able to do the same.
Vikas
Hi Vikas,
I tried this solution what I'm expecting and I got the solution.
Create Input Box
Step 1: Open QlikView
Step 2: Right click and choose Input Box
Step 3: In General, Click New Variable and Enter the Variable Name, click Ok
Create Button (Reload)
Step 1: Right click and choose Button
Step 2: In General, Type Submit in Text box.
Step 3: Select Action menu, click Add -> choose External -> choose Reload
Now the Button is Active
SQL Query in Script Editor
First, we need to create variable
For E.g. set vFirstName=$(FirstName);
Note: $(FirstName) is the variable of InputBox which we already given
Now create the connection string
Create SQL Queries:
For E.g.
Insert: SQL INSERT INTO TableName (FieldName1, FieldName2) values(‘$(variable1)’,’$(variable2)’);
Optional: SQL DELETE TABLENAME where FieldName(n)=’’;
Note: Why Optional means, if the User click submit button without enter the data we need remove that null value.
To display the data in QlikView
SQL SELECT * FROM TABLENAME;
DISCONNECT;
Now, we need to reset the QlikView InputBox
For E.g. set FirstName=NULL();
Lawrance
Ok Thanks
Vikas