Automations. Loop creates more rows than expected #11903
-
Hello and thanks for the help in advance. I have a text column which can have values sperated by a comma, like this: 111,222. Whenever such a value is inserted, I want to split the value and create, in this case, two rows where the values are sperated and delete the original row. So far, I achieve this using a JS action to split the value by comma. Then I use the value of this step to loop in a 'create row'-action und populate the column with {{ loop.currentItem }} This works, however, there are not two rows created by four. The rows look like this: When testing, it says that the loop runs two times, which, I suppose, is correct, because the variable is split into two values. The automation is triggered when a new row is created. Maybe the fact that two additional rows are created within the automation re-triggers the automations? Any help to solve this is very much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I'm not really understanding the issue here based on what you have written. Can you provide some screenshots of the Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
I solved the problem myself. I had the problem only when I tried to handle values with and without a comma in the same automation. In the former case, it should create tow or more rows and in the latter, it should only update the trigger row. Now I use two seperate automations for these cases with a condition on top and it works. |
Beta Was this translation helpful? Give feedback.
-
Thank you for providing the answer for your issue! Hopefully it will help others who come here with a similar problem. |
Beta Was this translation helpful? Give feedback.
I solved the problem myself. I had the problem only when I tried to handle values with and without a comma in the same automation. In the former case, it should create tow or more rows and in the latter, it should only update the trigger row. Now I use two seperate automations for these cases with a condition on top and it works.