Forum Academy Marketplace Showcase Pricing Features

Showing Addresses "within" current users Address not Working Dynamically

Hi All,

I have been testing the accuracy of google API integration with Bubble. I have used the map extensively in the past without any issues.

The issue I have is I am trying to show a list of “contractors” who are within “X” km of current users’ address. Both “contractor” and “user” datatypes have a geo address field. bubble has no issues resolving addresses here. When I manually input the amount of km the function works as below:

However the “contractor” datatype also has a number field whereby the “contractor” can stipulate the “willing_distance” the moment I change the expression to use this field the function stops working. expression is as below

Basically using the dynamic field doesn’t seem to carry out the action while using a manual input does the trick I cant understand as they are exactly the same? - numbers? Am I missing something or is there another method?

Assistance greatly appreciate. will share editor if need be.

Thanks

Don’t you have privacy rules on users and/or contractors meaning logged out user can’t fetch the data you want to use?

Thanks for the reply, no privacy rules. It’s a blank app that I set up to test this specific function so all workflows and database fields are related to this test. All other dynamic data is pulling through. For some reason, if I manually put the distance in the expression, in this case 5km, it works fine and shows me all “contractors” near current user’s address. The moment I switch it from 5km to the dynamic number field (which also has "5’ as the parameter) it no longer works.

So its just strange as essentially the app should handle the expression the same (both are numbers) I suppose I could work around this using conditional states however far easier to just pull the data from a number field.

Completely stumped here. Created a brand new app. Works perfectly again with this statement:

Correct result in repeating group:

Now the exact same expression except now pulling the "10 " km from a number field:

but fails completely:

Not sure what is going on here.

Editor:

Editor:

Still trying to figure this out, no luck. Is there anyone who understands this problem or best to submit to bubble?