Loop doesn't seem to be executing first step


I seem to be having trouble with a loop not functioning as it should.

In this query, I should get a handful of records showing me when businesses are open (activity_schedules). Each of those has a specific location_id table reference that leads to a location record with the address.

I’ve got this list of activity_schedules, so I create a loop to add the location from each one to a variable called locations. (1. Look up the location. 2. Add it to the array.)

(Forgive all the hidden steps in the function–I’ve been doing lots of debugging to try and figure this out.)

But the array comes back empty, and the debugger doesn’t show it going through any looped steps despite having some 40 activity_schedule records.

Here are the details for getting the location record:

And here are the details for adding that record to the array:

Any thoughts on why this loop won’t execute?

Hmm will check this out. Quick question - how is locations set up? Is it an object array that matches the schema of the location variable in the loop?

Hey @ErinHWagner - it looks like your For Each Loop through activity_schedules is set to text and not the Variable. Otherwise it should say var: activity_schedules . Can you make sure that is set to the variable and try this again?

It’s something we are running into with the newly enhanced select box. Still working through refining that :slight_smile:


You were totally right. Thank you :slight_smile: