Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

run seperate tabs in script based on variable

Hi all,

If i had several tabs in the script but only want to run specific ones based on a variable how would i do this?


i.e.


1 = QVD

2 = DB

LET vScriptMode = 1

so i would want the QVD load tabs to run.

Thanks

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

read the variable from an external source (e.g. xlsx file) and depending on its value write:

If myVar='QVD' then

... your script in qvd page

End if

View solution in original post

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

read the variable from an external source (e.g. xlsx file) and depending on its value write:

If myVar='QVD' then

... your script in qvd page

End if

preminqlik
Specialist II
Specialist II

let vScriptmode=1;

if $(vScriptMode)=1

then

(tab1 script)

else (tab2 script)

end if ;

Not applicable

Add in the tab "exit script;"

ex.

Tab1

**********************

IF $(vScriptMode) = 1 THEN

....

Load Statemets of tab1....

....

ELSE

Tab2

*************

....

Load Statemets of tab2....

....

ENDIF