Dynamic Location Sorting

Hi there,

I’m building an app and have two types of users. For this example we will say “user” and “food vendor”. My objective is to figure out how we can show “food vendors” to the “current user” but only if the “current user” is within the “food vendors” service distance. Each “food vendor” will have a different service distance, as some maybe only want to travel within 30 miles and other are willing to travel hundreds.

Currently I have the location sorting working in a basic model, showing the “current user” any “food trucks” within x miles of “current user” based on filters set by current user.
Screenshot 2022-11-08 at 4.27.44 PM
I’d like to accomplish something like this but it doesn’t seem possible. Maybe through :filter or :sort?
Screenshot 2022-11-08 at 4.29.39 PM

Would greatly appreciate any thoughts or insight!


It’s red because Bubble expects text and it’s getting a list of numbers and a list of Users respectively.

You could do something like
RepeatingGroup User's List of Users : formatted as text
And in the formatted as text properties - in the content to show per list item, you could add
userCustomerMainAddress is within thisUser's userCatererServiceDistance miles of thisUser's Name

Hope this helps!

Ranjit from Atomic Fusion

Explore and reuse the community’s Bubble assets | Accelerate your Bubble development with Atomic Fusion

Hi @atomicfusion,

Hmm okay that makes sense, it’s just weird because the text where it’s red should be a number otherwise how would the expression make sense?

I’m sorry but I’m a little confused with that. Where exactly will “RepeatingGroup User’s list of users : formatted as text” go? I’m initially doing a search for users with vendor/caterer=yes, then want to filter that according to the current users mainaddress being within the caterer/vendor service distance.

Screenshot 2022-11-09 at 11.35.22 AM

Best regards

The RepeatingGroup User’s list of users : formatted as text would replace the content you have in the screenshot

Unfortunately that wouldn’t work, the content displayed within RepeatingGroup User is from the original search for users, which is where I’m trying to implement this.

As you can see.

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