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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

While condition on tLoop with context variables

I am creating a job that needs to run a subjob if a specific condition exists between two context variable. Basically, if context.local_user_count >= context.local_page_size, then I need the subjob to get called.
This is my first attempt using a tLoop like this. I am newer to Talend and need some help on how to set the parameters for the loop condition. I have tried a few things but nothing has worked.
I will attach an image of the job and the tLoop settings.

Thank you
Amy McGreal
0683p000009MAWM.png 0683p000009MAtN.png
Labels (2)
7 Replies
Anonymous
Not applicable
Author

I think you need a little more explanation of the problem.
You've said ">=" but your screen shot is "<=".
So you're modifying one or both of these variables in your tJava?
Anonymous
Not applicable
Author

I had been testing a few things and grabbed the screen shot with the wrong condition. I actually want to have it run if the user count side is >= page size. Then I have more data to pull.
Anonymous
Not applicable
Author

Attached is the code for the tJava. I increment the page number each time the subjob is called with a subjob value that is passed back. I have also attached the overall job.
0683p000009MAbp.png 0683p000009MAtS.png
Anonymous
Not applicable
Author

I can't see what you loop says...
You're incrementing page_number but say "user count side is >= page size"...it sounds a bit back to front...
I'd select the code tab in the design window so that you can actually see the while loop that has been constructed.
Maybe things will become clearer. Post that piece of code.
Anonymous
Not applicable
Author

I was able to get it figured out. I'm very new to using many of these operators and know little about java so I apologize if my post was confusing. Thank you for trying.
anut
Contributor
Contributor

Hi,
I am trying to achieve similar what you were trying to. Can you post the solution?
Anonymous
Not applicable
Author

Hey I'm able to use the tLoop without any issue...
Thanks
Sreenivasa