50
Views
15
Comments
json to structure to API
Question
Application Type
Reactive
Service Studio Version
11.55.7 (Build 63962)
Platform Version
11.33.0 (Build 44426)

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

CVS_TO_Json (1).oml
UserImage.jpg
vikas sharma
Champion

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

UserImage.jpg
jesu verso

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

UserImage.jpg
vikas sharma
Champion

Hi,

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.

regards

2020-07-21 19-28-50
Rajat Agrawal
Champion

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

UserImage.jpg
jesu verso

can you show me or screenshot how will i return back the for loop arrow? this gets me dconfusedd

2021-11-12 04-59-31
Manikandan Sambasivam

Hi,

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.

UserImage.jpg
jesu verso

this is my firs ttime hearing adding delay, how can i do it in a outsystem loop? thanks sir!

2021-11-12 04-59-31
Manikandan Sambasivam

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


UserImage.jpg
jesu verso

thank you for this sir! but one thing how will i put the sleep on for loop like for every each data? 

2021-11-12 04-59-31
Manikandan Sambasivam

Please check the below link

https://www.youtube.com/watch?v=D8mb9XExec4

2022-12-30 07-28-09
Navneet Garg

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


UserImage.jpg
jesu verso

sure

2025-01-31 03-15-38
Irfan Ahamed Abdul Shukoor

Hi @jesu verso 

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


UserImage.jpg
jesu verso

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

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