have to call the API multiple times and each time i need to update the UI ?
Application Type
Traditional Web
Platform Version
11.14.0 (Build 34092)

find the below API Response.






and I am trying to implement the ui which shows the API data, we need to call the api multiple times in a loop("processed" will get increase on each api call) until the api response.processed = response.total . each time I need to update the UI widget(message details), once the condition is satisfied I need to display some other UI widget (number of api calls with download button).

please help me on this

In your UI, set an Expression tied to a local variable to show the values you want to show on screen, within a container around it. 

Then, on each loop, update that local variable and follow it with an ajax refresh on that container.

Not entirely sure this will work since I haven't had this need in Traditional web but give it a go

Check this link:


You could implement the "Long Polling" technique -> Web Block, having the UI functionality you want, that makes a call to a Server (or a Sevice) Action on your back end, which in turn calls the REST.

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