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

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

Create, set and update the value of a Variable

I have a query that might return 0 or 1.

 

If it returns 0 then I need to wait for 2 minutes and keep trying again till it returns 1.

 

Whats the best way to implement this logic ?

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

I assume your query is from a tOracleInput.
tLoop (while with the condition (Integer)globalMap.getOrDefault("stop", 0) != 0) -->tOracleInput-->tSetGlobalVar (to set the "stop" variable with the result of the query)--if((Integer)globalMap.get("stop") == 0)-->tSleep(120)
That's the idea

View solution in original post

1 Reply
TRF
Champion II
Champion II

I assume your query is from a tOracleInput.
tLoop (while with the condition (Integer)globalMap.getOrDefault("stop", 0) != 0) -->tOracleInput-->tSetGlobalVar (to set the "stop" variable with the result of the query)--if((Integer)globalMap.get("stop") == 0)-->tSleep(120)
That's the idea