How to change the iteration list?
Application Type
Traditional Web

Hello how are you? My knowledge of OutSytems is basic and I'm having difficulty iterating one by one list and then using the same forEach to iterate another list. Perhaps this is not the best practice and if not, if possible, I would like an idea for performing this procedure.


Action HasNextLink

In the first API call I check if it has a link.Rel equal to "next" and regardless of the result I record the results. Then, If it has NEXT, I add +1 to the page and make another API request with the new endpoint, however, when I return to forEach it again goes through the list of the first API call. getting in an infinite loop.

How would I make each new request the iteration to be done with the response of the current request? I researched something about Fake List, where I would have to clear the list before adding the request result and the ForEach interaction would be done on this Fake List. But I didn't get any results. Have you been through this? Can you give me some strength please? Attached is the .OML of the project.

Thank you very much in advance!


I was iterating over the request response before assigning the response to a variable.

If you have a NEXT in the list, I set the TRUE in the session variable and end the action. Otherwise, continue scrolling through the list by setting FALSE.

This experience served as a learning curve. I hope this resolution contributes to the learning of others.

If you found a more performant resolution, please share.

A hug to everyone in the community!


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.