I’ve got the impression I have painted myself in a corner
I call a Plugin Action I wrote with a list of Things as input, say a list of
The Action does some processing and returns a list of values (an
order_id for each of the
So far, so good.
Then I’d need to update each of the Things I passed in with the values returned, and I thought I’d get away by using
Make changes to a list of Things as follows:
And the result is that each of the
Postcards has all the
order_ids and not just one.
Any kind soul who knows the RightWayTM of doing what I’d like to do?
You are sending a list of texts to a text field in each instance. This is why.
Explore how recursive backend workflows work.
Send the list to one that you set up to perform an action to update each record one text at a time and set up an extinguishable condition (i.e. thing index number < search for things:count+1) to make it stop once it reaches the last entry.
Thank you very much @cmarchan!
I took a look and came up with the following - would you mind telling me if this is what you intended?
- Create a “Backend workflow” that accepts a “Postcard”
- In this workflow,
2.1 Call the API Action with the item
2.2 Change the item’s “Status” to “Processing”
2.3 Schedule the same workflow with the ‘first Postcard that hasn’t got the status = “Processing”’
- Change the element’s workflow responsible with triggering the backend workflow that we just created to trigger it with the ‘first Postcard that hasn’t got the status = “Processing”’
I haven’t used any counter, but leveraged the Status field that’s present on the item itself.
Would using a counter be better?
How should I modify it to do that?
I can’t test it as I’m still on the “Hobby plan”, but I think I’ll move soon (once I’m sure I can do all what I need to do ).
The counter as an index will be needed in each run. If you can also have an aggregate count number could replace the search as the brake.
Makes sense, thank you!
I’ll try and play some more, and see where I get to.