Hi - I’m tearing my hair out with a problem and was wondering if anyone here might be able to help.
I have an Airtable spreadsheet that looks like this:
I’m trying to create and display a list which shows the distance from an inputted location to each of these restaurants, and the name of each restaurant. I’m doing this using the Google Maps API.
The output I get from this in the app is a list of the correct distances to each restaurant, but it just repeats the name of the last restaurant 3 times. e.g.:
The distances are correct, and displayed in the correct order. I just can’t figure out how to display the correct restaurant name for each distance! These are my blocks - if anyone can figure out what’s wrong here, that would be absolutely amazing. Thanks!
To talk you through the blocks:
- first call the Airtable spreadsheet
- then begin loop for each item in the list
- the green Web_API block is using the Google Maps, using the coordinates of each restaurant from the spreadsheet
- the purple API block gets the response; and then saves as a list the time in seconds to each restaurant (the big pink thing) and the name of the restaurant (this latter bit is what’s broken).