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: 
kandu
Contributor
Contributor

Looping tRESTClient through pagination

hi, im new at talend.

i want to try looping data extraction via tRESTClient.
the condition are looping from page 1, until page that has no responses.

i try like this

kandu_0-1735214300950.png

my configuration on
tloop1 = loop type : while, condition : context.hasMoreData (it set true when there are responses present, default : TRUE)

tjava5 = 
if (row6.ConsentStatus != null && !row6.ConsentStatus.isEmpty()) {
context.currentPage += 1; // Increment page number
} else {
context.hasMoreData = false; // Stop the loop
}


idk why it always stop at 1st iteration, and context.hasMoreData always change into false after i run the logic on tjava.

can someone help me.
thanks

Labels (3)
1 Reply
Dave_Simo
Creator II
Creator II

Hello Kandu,


At first glance like this, try replacing the tJava_5 with a tJavarow

 

Best Regards