Problem looping the result set of a GET method

Hello,

This one seems evident but unsure as to why it does not work as desired. I have a workflow that has multiple steps.

At one step, I invoke a GET method (from Xano) that returns an array of objects. I need the id from each of the object. Hence as a next step I added an Iterator and gave the above result set in my iterator formula.

Inside the loop I add objects to an existing array variable. I thought I can pick up the id value from the loop variable results. But it always shows as undefined.

Below are a few images to help explain my workflow better:

This is the formula I gave in my iterator and I can see that it returns an array of objects:

Below is the action that I define inside the loop. If you look at the event window you can notice that the loop result is empty

Whereas, if I store the GET results in a variable and use that in my loop iterator, it works. But then, I wouldn’t want to create a variable unnecessarily.

What am I missing?

Can you try disabling the action inside the loop and triggering the loop? The “looped item” becomes available after running it once.

You mean remove the action inside the loop just to test?

Okay, I fixed it by using Return value instead of the GET request in my workflow. It works fine now. Below is the modified workflow:

And in the formula window, I invoke the GET request: