Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

create X clones from task

JensH September 6, 2022

Hi
I have an Order and a Shipping project. When orders are complete a shipping task is create via an automation. Works great, shown below. 
I have now learned that at some point during the order process it is known that it may consist of multiple shipments. Each shipment should be its own shipping task. 

I have created a "number of shipments" custom field on my order task. In my "create shipment from order" automation i would like to create that number of clones of the order tasks as shipping tasks. Somewhere in my automation i need a loop if sorts, but i can only seem to get automations to loop over lists of things and not at 1..x simple for loop.

Is this only something that i can do with external scripts or rest api's or is there some smartvalue trick that can used here?

 

My current solution is a manual automation trigger for creating more shipments, but it is not as neat as i could wish for.

Thanks in advance for any help.

My current automations, create shipping from order and create next shipping:

 

Screenshot 2022-09-06 at 17.06.54.png

Screenshot 2022-09-06 at 17.07.14.png

 

 

 

1 answer

1 accepted

1 vote
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 6, 2022

Hi @JensH ,

Unfortunately there is not looping feature in automation. There is this request that has been open for the suggestion https://codebarrel.atlassian.net/browse/AUT-1312 

What you can do is to simply use the If/else condition to create the number of clones that you want. For example, 

If custom field equals one then create one clone

If custom field equals two then create two clones

etc

Does this make sense?

JensH September 6, 2022

Thanks @Jack Brickey !

It makes perfect sense for just doing the unrolled for-loop with if-statements. Thanks for reminding me of things that i once learned but forgotten :)

Best
Jens

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events