I have here an module that upload csv and turns it into json and put it into structure but the problem is i want it when i successfully display it and put it into structure i want it all the data that is send into API 1 by 1 directly how can i do it? they im going to use for loop or what, thank you for helping me, im attaching my module
Hi,
It will be good if you can elaborate and pin point your issue. Exactly what issue you are facing, please let us know like in which flow, action etc.
regards
that OML is sucess where i can put excel data intro structure, i want the data inside of structure each by each be passed onto an API. i just want to know what is missing if im going to use loop or list appendall
Also as you want to call the API for each record, it may be time consuming on the UI. So here I would suggest you should create one BPT to call the API in a loop. You can pass the Json string in BPT as input then write complete logic there as mentioned by Rajat.
But if you want to show the status of each API calling on UI then you should call it using for each loop as suggested by Rajat. But it don't seems a case here.
wdym BPT sir? thanks!
Hi @jesu verso
I saw your OML ,If you want to call API for each record of List then simply apply the for each loop.
Inside the loop, you can use an OutSystems REST API integration or SOAP Web Service integration to send each data item or record to the API.
Regards ,
Rajat
can you show me or screenshot how will i return back the for loop arrow? this gets me dconfusedd
As Rajat mentioned, you can use a loop, but adding a delay between iterations is good. Sometimes, APIs enforce rate limiting, so having a delay when calling the API in a loop can help prevent issues.
this is my firs ttime hearing adding delay, how can i do it in a outsystem loop? thanks sir!
You can add a sleep action within the loop as shown below.
Use the below component from the Forge and use it inside the actions. In the example below, the sleep action is set for 15 seconds in the flow.
https://www.outsystems.com/forge/component-overview/14830/sleep-in-reactive-o11
thank you for this sir! but one thing how will i put the sleep on for loop like for every each data?
Please check the below link
https://www.youtube.com/watch?v=D8mb9XExec4
can you provide more detail you are using csvtoxlsx but i didn't find any reference for that. If you want to convert csv to json you can use following forge component.
https://www.outsystems.com/forge/component-overview/10780/csv-to-json-o11
sure
Iam trying to understand that if you are trying to read the content from the Json and send it to a API one by one? Let me know if it is.
Thanks
as you can see in the OML after i display the data into the table and put data into structure, i will have another button that will send the data onto an API, all of the data