Thanks for all the help so far on this forum.
I now have a new one and the scenario is as follows:
I have a repeating group listing products from my db
I have created a custom state for the repeating group and I am adding / removing items to it by selecting / deselecting them from the repeating group.
Once all selected, I need to push them via API to a marketplace. Now, the API documentation allows uploading items 1 by 1 and I managed therefore to upload only the first item and I am struggling to understand how to get the entire list over on the marketplace.
Is there a way of creating a loop workflow that runs the API for every item in the list?
thank you. I read more about the iteration number and made it work. I will summarize the solution below maybe it is helpful for somebody else:
Solution: Step 1 - creating API workflow and defining parameters
Create API workflow “upload” and define 3 params:
List of things you want to go thru (in my case “products”)
Index
Count
Step 2 - creating API workflow list of actions
Action 1
Define first action of the API - in my case upload data via a predefined API
Action 2 - this is the looping instruction
Schedule API workflow and choose same API “upload”
Scheduled date: Any convenient date for your app. In my case “current date & time”
Define parameters:
List of things = products
Index = index+1
count=count
Only when index<count
Action 3(optional)
Send email confirming success and add whatever data is relevant to you
Step 3 - Triggering API workflow
In order to trigger the API workflow, I am using a button in my app:
When button pressed ->Schedule API workflow “upload”
Scheduled date=current date&time
Params:
Products = list of selected products
Index = 1
Count = list of selected products:count
This is the definition of list of selected products: