I am running an automation that:
- reads a set of logics from a table
- for each logic (repeat for each > logics list) executes a script that does some calculations
I want to add a trigger that in the final "repeat for each" loop, a script updates a record in a table so that I know that the whole automation has been executed and can trigger the next one.
I can write a script and input the length of the logics list but I am not sure how I can keep track of the current loop number (through a counter or variable?).