Hi I’m trying to display a list of store locations based on a zip code input by a user.
I have a long list of store locations in a Firestore DB - each with a zip code and long / lat. Let’s call this data sheet “stores”.
What I’m doing currently is save the zip code input by the user into a data slot. Then call an JSON API with that zip code - which returns to a data sheet a list of zip codes and long / lat nearby (Eg. with 3 miles). Let’s call this data sheet MultiZip. See screenshot.
My question is how would I then use these zip codes returned to query the “stores” data sheet. Eg. take the next one in the screenshot from 90210 (Beverly Hills) which is 90077, and query the data sheet “stores” for rows matching 90077? Ideally I would like to have a number of these zip codes returned by the API (Eg. take 90077, 90069, 90290, etc) and query all of them against the FIrestore DB for a match then display them directly in a list in a following screen.
It seems like I have exhausted the line of cascading action possible. As in I know with a button press, I can have either a data sheet filled out by an JSON API, or a data sheet filled out by a Firestore plugin. In this case, I need the FIrestore plugin to take some data from the first data sheet and return a query.
Maybe a custom script? I have seen some examples but have no idea what the script would look like in this case.
Thanks in advance.