Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reload part of the script using buttons

Hi All,

I am having 10 tables in script ,each schema having 5 tables ,so I have 2 data models in a script .

My requirement is I want to split 2 different schemas and also want to 2 buttons in UI. when I click on button 1 then schema 1 should get reload and when I click on button 2 schema 2 should reload instead of all tables.

Please suggest

13 Replies
Not applicable
Author

Using this solution :

IF $(vVar1) = 1 then

  Table1:

  LOAD * Inline [

  Dim1, Value1

  A, 600

  ];

ELSEIF $(vVar1) = 0 then

  Table2:

  LOAD * Inline [

  Dim1, Value2

  B, 800

  ];

ENDIF

sunny_talwar

In that case, I would suggest you to explore the second option

Not applicable
Author

Tried second solution also, there also I can see only one table at a time.

sunny_talwar

These are the steps you need to follow:

1) LOAD all data without any if statements

Table1:

  Replace

  LOAD * Inline [

  Dim1, Value1

  A, 100

  ];

  Table2:

  Replace

  LOAD * Inline [

  Dim1, Value2

  B, 200

  ];

2) Now set up your front end with the buttons and other objects and add if statements back in the script. NOTE: Make sure your Reload action as Partial reload checked. Also note to change the data to see the change on the front end (see the new numbers in red)

Capture.PNG

IF $(vVar1) = 1 then

  Table1:

  Replace

  LOAD * Inline [

  Dim1, Value1

  A, 100 200

  ];

ELSEIF $(vVar1) = 0 then

  Table2:

  Replace

  LOAD * Inline [

  Dim1, Value2

  B, 200 400

  ];

ENDIF

3) Select one button at a time and see how the reload changes just one data set at a time