I have a form with various input types, when the user clicks “send”, it creates a new thing (job order).
One of the inputs on this form is a multi-choice drop-down. In most cases a user will only select one choice. But in the event that the user selects more than one, in the workflow I want to create a new thing for each selection he chooses. How do I do this?
One user suggested a recursive workflow but if this is indeed the solution, I would need more details on how to go about doing this.
Here is a good video walk-thru on how to build a recursive workflow (focus on the looping teachings and replace the actions inside the loop with the one/s that you want to run)
Thanks for the helpful video. I am stuck on something I hope you can advise me with:
I have a form with various input types, when the user clicks “send”, it creates a new thing (job order).
One of the inputs on this form is a multi-choice drop-down. In most cases a user will only select one choice. But in the event that the user selects more than one, in the workflow I want to create a new thing for each selection he chooses.
Following your video instructions, I created the new input, but my first action then is “create a new thing” and not create a new email as in your video. However when I create a new thing, there is no option to add an item# as in minute 4:26 of this video.
Call the first one “index” and set to be 1 when you send it to the backend flow
the second one “count” and set it to be the count of the items in your list
When you create a thing in the backend flow you now have an “index” which in your first item created will be 1 (set item # to be item”index” where the index is the number of the item) … and then when you schedule the workflow on itself you add +1 to the index to get it to be the next item which would be 2, and then 3, and then 4 all the way to the end when the loop stops.
The “count” parameter is your brake, as you should place a condition on the rescheduling action (the one on itself in the backend flow) to be “only when index < count”. Say that your list is made of 4 items …, when the index is 4 and it reaches this condition the flow will stop because 4 (the index) is not less than 4 (the count of the list).
Do not forget to set the brake otherwise you will build an infinite loop which will slow down your app. These are very bad news for apps.
I have created the two parameters but the issue I am facing is after I have done this, I go to “create a new thing”, but when I create a new thing there is no option to set item # as you and the video instructs me to do. Please see attached image. (the new thing I am trying to create is called job_translation)
idk if it would work for your exact use case, but have you considered sending the items to a hidden RG and using the orchestra plugin to ‘run an action on a list of items’