Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
lawrance
Creator II
Creator II

How to Store data from QlikView input box to SQL when clicking Button object?

Can anyone tell how to Store data from QlikView input box to SQL when clicking Button object?

3 Replies
vikasmahajan

Hi,

SQL Writeback

&

https://community.qlik.com/docs/DOC-5970

Refer this links you will able to do the same.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
lawrance
Creator II
Creator II
Author

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

vikasmahajan

Ok Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.