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: 
Edith1
Creator
Creator

How do I build a job to keep calling the tRESTClient and loop through the previous tRestClient Response?

I'm new to Studio and not sure how to build the following scenario. A category can have zero to multiple categories and it can have multiple levels deep. To get a category or categories, I call the API with the category's ID.

In the outline below, ID#1 named CategoryA contains 2 categories #3 CategoryZ and #4 CategoryN. In one of those categories, #3 CategoryZ contains 1 category #5 CategoryN. This outline can keep going into multiple levels deep.

  1. ID#1 CategoryA
    1.  ID#3 CategoryZ
      1. ID#5 CategoryN
    2.  ID#4 CategoryX

The API is called for ID#1 and the response lists ID#3 and ID#4. Then I have to call the API for ID#3 to see if there's any categories; in the example above I will get ID#5 in the response. Then I have to call the API for ID#5 to see if there's any categories and in this case the response is null. Lastly, I will call the API for ID#4 and the response will be null.   

 

How do I build a job to keep calling the tRESTClient and loop through the previous tRestClient Response until the response is null?   

 

 

Labels (2)
0 Replies