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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to set a button that only execute part of the script.

I have a Qlikview application witth two buttons A and B and a script similar to this:

// Part 1

Oracle_Table_1:

sql set * from Oracle_table;

store Oracle_table into c:\QlivewFile_1.qvd;

Oracle_Table_2:

sql set * from Oracle_table_2;

store Oracle_table into c:\QlivewFile_2.qvd;

// Part 2

Oracle_table_1_Final:

Load *

from  c:\QlivewFile_1.qvd (qvd);

Oracle_table_2_Final:

Load *

from  c:\QlivewFile_2.qvd (qvd);

Button A will execute both Part 1 and 2 in one go. This is fine and I can do this button.

But for button B, I only want to execute the Part 2 (i.e. Load from the qvd file). Could you give me some idea on how to do it?

Thanks in advance!

1 Solution

Accepted Solutions
avinashelite

try like this :

if $(vA)=1 then

// Part 1

Oracle_Table_1:

sql set * from Oracle_table;

store Oracle_table into c:\QlivewFile_1.qvd;

Oracle_Table_2:

sql set * from Oracle_table_2;

store Oracle_table into c:\QlivewFile_2.qvd;

ENDIF

if $(vB)=1 then

// Part 2

Oracle_table_1_Final:

Load *

from  c:\QlivewFile_1.qvd (qvd);

Oracle_table_2_Final:

Load *

from  c:\QlivewFile_2.qvd (qvd);

ENDIF

View solution in original post

4 Replies
avinashelite

Try like this :

For the button A : add a action to set a variable like vA=1 and similarly for button B and in the load script you can utilize this variable to execute the load 

avinashelite

try like this :

if $(vA)=1 then

// Part 1

Oracle_Table_1:

sql set * from Oracle_table;

store Oracle_table into c:\QlivewFile_1.qvd;

Oracle_Table_2:

sql set * from Oracle_table_2;

store Oracle_table into c:\QlivewFile_2.qvd;

ENDIF

if $(vB)=1 then

// Part 2

Oracle_table_1_Final:

Load *

from  c:\QlivewFile_1.qvd (qvd);

Oracle_table_2_Final:

Load *

from  c:\QlivewFile_2.qvd (qvd);

ENDIF

Not applicable
Author

avinashelite

Cool Happy  Learning