I built a function for Michael G. at Tongo that gets data from Yelp, reformats the data, and creates/edits a record. A couple days ago, he reached out saying it was no longer working.
I had a look, and it appears that some steps are being treated like they’re in a loop even though they’re not. Here’s what I’m seeing:
This is the function stack:
At the end, I create a variable and populate it with a single piece of data from the Yelp api: The venue’s name.
You can see from this API output that I formatted it correctly:
But when I run it, it says the variable is an array of blank values:
It appears to have created a blank value for each day the company is open (each time we looped the schedule reformatting).
Here’s where it gets really funky: If I move that step of creating the variable up to the top before the looping, then it works just fine!
For the time being, I’m just going to create variables for each property right at the top of the stack, and I’ll reference those variables when I create the new record at the very end. However, this is super weird and I’m sure it will trip us up eventually, so I wanted to let y’all know.