Filtering a repeating group by Geographic Location

Hi all,

Hoping someone can help with this. Pretty new to Bubble (and loving it) and this is my first question in the forum.

I have a searchbox on my page with the ‘Choices Style’ of Geographic Places.

I’m then using the input to filter a repeating group of users (all of whom have an address - which is also of type Geographic address’).

I’m using the constraint: Address is within 5kms of SearchBox Location’s Value’s Formatted Address

The issue is, if someone inputs ‘England’ for example, or a town like ‘London’, the Geographic address from Google Places API is (I believe) a single location in England. So anything outside 5kms of that exact location won’t show in the results.

Ideally, if a user entered ‘England’ all results within England would be shown, but if they just entered ‘London’ it would be all results in London. So in effect, the distance parameter would need to change.

Is there a way for example to constrain the search by City from the searchbox matches the city from the Users location or Country from the searchbox matches the country from the Users location?

I hope that all makes sense and I’m not being too dumb here!

Thanks a lot!

Also, I’ve tried using the constraint Address is within SearchBox Locations’ Value:extract city but that doesn’t seem to function properly. It works for some cities, but not others for some reason. E.g. I can enter Brighton in the search box, and a number of my users have addresses where the city is Brighton, but no results show :thinking:.

This topic was automatically closed after 70 days. New replies are no longer allowed.