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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Create loop, execute, then continue with main flow

Hi
Im trying to solve something like this :
In main flow I call webservice, got list of items, then I need to call webservice for each item I've received in a loop, find correct subitem (response from webservice in loop) and continue with main flow.
So basically in pseudocode I need this :
list = webserviceCallback();
foreach(item : list) {
   response = webserviceCallback(item);
   if(item == expectedResult) {
       result = item;
       break;
   } 
}
continue main flow ...

What is the best way to achieve this ?
I tried the subjob, but Im not sure how to pass input variable there and retrieve output.
Another posibility would be create some sort of 'subflow' in main job, but Im not sure how to do this either.
Any thought or suggestions are welcome...
Labels (2)
1 Reply
Anonymous
Not applicable
Author

I found a solution - 
1. create subjob
2. you can send input variables using context - subjob can has his own variables, which are not visible to context of main job
3. Output can be done via context variable by passing something by reference (e.g. concurenthashmap)