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

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

Combine tFlowtoIterate with condition (run if)

Hi, 

I want to make API REST calls that use certains parameters included in a csv file. 

My flow is like this:

 

tFileInputDelimited-->Main-->tJavaRow --> Main--> tMap--> Main --> tFlowToIterate --> Iterate --> tJava --> Iterate --> tLoop--> Iterate --> tRest --> Main --> tExtractJSONFields --> Main...

 

I use tLoop to loop through all pages of the API in component tRest. The problem appears when tRest return an error. How can I implement a condition between tRest and tExtractJSONFields to avoid when ERROR_CODE returned by tRest is not null?

0683p000009MaYB.png

I have tried to include tJavaRow_4, tHashOutput and tHashInput between tRest and tExtractJSONFields. In tJavaRow_4 I create a global variable whose value depends on the value of the ERROR_CODE, and the condition between tHashOutput and tHashInput tests the value of the global variable.

 

The problem is: my flows doesn't go further than the component tHashInput, so I'm not able to extract the Body response in tExtractJSONFields. When my flow reaches tHashInput, another iteration starts. Why is this happening?

 

Thanks.

Labels (6)
0 Replies