Loop action issue - doesn't act?

I have an issue with a very simple loop for debugging purposes. As you can see from the rest of the script before, I created “var_array”. Console tells me, that I have 10 records in the array (as defined earlier).

Now looping through </> array should show me each record from the JSON array.

Instead I get this:

Seems like its not really looping through the array?

@dirk_s did you ever solve this?
I’m also having an issue with the Loop Action.
Trying to look up a view in Tape and then send an email alert with a list of URL’s for the items in that view which need attention. It is technically looping…but not returning unique URL’s.
aka if the view has 5 items, the email contains a list of 5 URL’s, but they are all the same URL, they have not progressed forward in the loop like I would expect…

@CarsonRedCliffLabs I think yours can be fixed by converting your calculation to a script.

A few examples of working loops:

Now this is one I built to try and duplicate what you were doing:

however when I then convert this to use a calculation:

I end up with the same URL multiple times

2 Likes

How that we see the difference… I also had the feeling(!) that I had trouble with calculations while scripts worked as expected. I never did any more investigation, when I found out I used a calculation instead of the script action.

Probably one should dig a bit deeper into the calculation action and find our what happens.

Thank you @Jason !
Yes it appears that should solve my problem. I don’t fully understand why it works correctly in the Script but not the Calculation version of that step…maybe @Tim could chime in on that.
But for now, at least a script solution is possible.

1 Like

Unfortunately this is a known issue which was discovered in the past here:

We will at some point resolve this, however it will require a slight rework of the “Calculation” action. Until then, we encourage you to use the “Execute Script” action with variables, which is way more powerful and basically a superset of the “Calculation” action in terms of functionality.

Thanks for your patience &
We will keep you posted on this

Cheers
Tim

1 Like