Hi, I have a table named โGeofenceโ It has a column Coordinates which has Longitude and Latitude Coordinates. I have added a virtual column named โDistanceโ with formula โDISTANCE(HERE(),[Coordinates])โ
Now What I want to do is hide all UX views if the distance between any of the coordinate and users location is less than 1KM.
How can I do that? I tried various formulas but those are not working, One which is very close to what I want to do is pasted below.
Show If Constraint in UX Views:
IF(
โGeofenceโ[_Distance]<1,
โtrueโ,
โfalseโ
)
Please Help
Solved! Go to Solution.
Maybe try this?
MIN( Geofence[_Distance] ) < 1 )
Thatโs assuming DISTANCE() outputs in kilometers, which I have no idea if it does or not. Also, the app will need to sync for these distance columns to recalculate based on current position.
Maybe try this?
MIN( Geofence[_Distance] ) < 1 )
Thatโs assuming DISTANCE() outputs in kilometers, which I have no idea if it does or not. Also, the app will need to sync for these distance columns to recalculate based on current position.
DISTANCE() returns kilometers.
It is giving an error
"Unable to find column DISTANCE
On Google Sheets
Coordinates are saved in following format
Looks like your column is named โDistanceโ, not โ_Distanceโ. Is that the issue?
Thanks, You were right.
But now getting a new error
โThis formula is not evaluated in the context of a row, so column values are not available.โ
Thatโs not an error. Itโs just an informative message about what sort of expression you can write in that spot. This expressions conforms to the constraint.
It worked, thanks a lot.
User | Count |
---|---|
38 | |
34 | |
27 | |
23 | |
17 |