Skip to main content
Announcements
New: No-code data prep in Qlik Cloud Analytics™ TAKE A TOUR
cancel
Showing results for 
Search instead for 
Did you mean: 
Serphentelm
Contributor III
Contributor III

Using tMsgBox on RunIf

Hi Team,

I've a very simple question:

I got a tDbInput that read a count(*) from a query and i want to use the TMsgBox when count(*) > 0.

so the job wuold be:

TDbInput --if --> TmsBox

where the query on Input component is just a "select count(*) from my_table where my_condition".

I think this is a pretty simple task, but I can't figure out how to retrieve the information in the if window.

can anyone help?

Thanks

Labels (2)
1 Reply
anselmopeixoto
Partner - Creator III
Partner - Creator III

HI @matteo marchesi​ 

 

I suggest you use a tFlowToIterate in between those components to create a global variable storing the count value produced on tDBInput.

 

The job will become something like this:

 

tDBInput --row1--> tFlowToIterate --If--> tMsgBox

 

Considering the schema on tDBInput has a column called "count", tFlowToIterate will automatically create a global variable called "row1.count" and you can use it on your If trigger like this:

 

((Integer)globalMap.get("row1.count")) > 0