Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Champion
Champion

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

Hi,

SQL Writeback

&

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

Refer this links you will able to do the same.

Vikas

Highlighted
Creator II
Creator II

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

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

Highlighted
Champion
Champion

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

Ok Thanks

Vikas