Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Run part of the code with variable control

I have a dimensions and facts.
I don't want to execute the dim's part (create qvd for each dim) every interval, only every 3 intervals.
so my idea was to create a counter variable (if variable >3 run the dim's part).
any advise how to do that?

is it possible to pass variable from management console?

3 Replies
marcus_sommer

You could use something like this directly or outsourced as include-variable:

if $(vIntervalCounter) < 3 then

     let vIntervalCounter = $(vIntervalCounter) + 1;

     exit script;

else

     let vIntervalCounter = 0;

end if

....

// Your Load-Statements

- Marcus

Not applicable
Author

Thanks,
what is the best source to use for save the variable?

is it possible to pass variable from management console?

marcus_sommer

I'm not sure but I believe you couldn't pass such variables from the qmc - maybe the publisher had here more options. But you could generate such variable externally and store it in a textfile which could be load as include-variable and then use a logic similar to the above mentioned.

- Marcus