Looping action method freezing

Hey everyone.

I'm trying to create a looping action to fill an Order status timeline when a quote is generated (I'll run on automations but i'm testing manually right now) using as reference the @MultiTech 's video bellow

https://www.youtube.com/watch?v=q4xCzxPgbaU&ab_channel=MultiTechVisions

During the manual tests and some researchs on the community i figure out that my problem seems to be on the Loop Repeater condition but as far as i'm concerned the formula i used was okay.

For clarity here's a Entity Relationship Diagram and the Actions settings i used.:

ER Diagram:

 

Action settings:

 

 

Show More
1 - Action to create a record on Order_Timeline Table
Thales_Taranto_3-1662668243789.png

Thales_Taranto_6-1662668300714.png

 


2-Loop (Repeater)

Thales_Taranto_4-1662668272146.png
Thales_Taranto_7-1662668336443.png

3- Loop grouped action

Thales_Taranto_8-1662668362375.png 

That been said I was wondering if someone can help me figuring out what is going on.

Appreciated

 

 

Solved Solved
1 6 281
1 ACCEPTED SOLUTION

That depends on how yo have those other columns implemented and if they will automatically adjust your "Remaining" column.

What I have typically done is created a separate action, added to the looping group, that explicitly updates the control List by removing the item that was just "processed". 

In most of my cases, I would process the FIRST item in my control List.  So to adjust the list before looping again, my update action would change the control list like this:

[Remaining OrderTimelines Aguardando] = 
[Remaining OrderTimelines Aguardando] - INDEX([Remaining OrderTimelines Aguardando],1)

 Again, this depends on how you have your control list column implemented.

View solution in original post

6 REPLIES 6

In the Loop Repeater action, you are using the list [Remaining OrderTimelines Aguardando] to control the looping and break out when it is empty.  In your Loop Grouped Action, there needs to be an action that removes each item from this list as they are "consumed" by the loop.

I think I see what's going wrong....

On the new action, it looks like the item that you're creating is the first item in the list of items that needs to be made.

  • That column should instead be pointing towards the remaining list, not the master list.
  • So I think what's happening is each time the loop runs, it's creating the first item in that Master list over and over and over again.

Try changing the column inside your index formula

I changed to:

INDEX([Remaining OrderTimelines Aguardando],1)

And still freezing ๐Ÿ˜ž 

I see. So i thought i already did it. Here is the [Remaining OrderTimelines Aguardando] formula:

Thales_Taranto_0-1662673846048.png

Isn't it supose to remove an item everytime the [Created Orders_Timeline] list increase (when a order_timeline related to an order is added)?

That depends on how yo have those other columns implemented and if they will automatically adjust your "Remaining" column.

What I have typically done is created a separate action, added to the looping group, that explicitly updates the control List by removing the item that was just "processed". 

In most of my cases, I would process the FIRST item in my control List.  So to adjust the list before looping again, my update action would change the control list like this:

[Remaining OrderTimelines Aguardando] = 
[Remaining OrderTimelines Aguardando] - INDEX([Remaining OrderTimelines Aguardando],1)

 Again, this depends on how you have your control list column implemented.

Thank you @WillowMobileSys !!! I did some changes to use your control method and it worked

Top Labels in this Space