Forum Academy Marketplace Showcase Pricing Features

Filter a list of cities by Google Api duration

Hello everyone,
I’ve been stumbling over this problem for two days now. I’m trying to make a page that lists cities according to criteria entered by the user in a form page.
My database is structured like this:

  • a “cities” table with a “geographic address” field and a “ranking” criterion (integer between 1 and 50)
  • a “simulation” table that records all the simulations requested by those filling in the form. One of the fields of this table is a list type “results” field in which I add (as soon as the form is filled in) the list of cities that correspond to the criteria that have just been filled in.
    So far everything works fine, I am able to redirect at the end of the form to a page that displays the list of cities corresponding to the criteria and sorted according to my “ranking” criterion.

I would just like to add a custom address field in the form to refine the list of results and filter the cities too far from this custom address with the Google API.

I manage to send to the results page the results of the first step “create a new simulation”. On the results page, I manage to add a column in the repeating group and to display the travel time between the custom address and the cities using the Google API …

… but I can’t filter this list to display only cities located less than two hours away.

I tried to filter the repeating group data with an advanced filter …

… but since it’s a list, it doesn’t work.

I hope I made myself clear, thanks in advance for your help !