Calculating distance between two points - error message
![Mr_English](https://us.v-cdn.net/6037124/user_avatars/1271230.jpg)
I would like to calculate the distance between a start point and all the records in the table. The requirement is to find all Users within 50 miles of the input location ( = ‘place’).
Question 1: Is there a way to do this in a Custom Query? I've tried but there doesn't appear to be a way.
Question 2: Is there a way to get the distance between geo_points, rather than lat/long pairs?
I am working with this data:
This is the function stack and calculate distance form:
This is the Run & Debug:
Which generates this error:
Best Answers
-
place.long is recorded as “text” instead of a “var”. Click on the 2.1 in your function stack, click the “longitude_2” field, and select the “place” variable to make sure it uses that. You'll the the little notice in the upper-left of the input box go from “text” to “var:any” - should work better.
If that doesn't seal up your issue, please post what you get at that point! -
@Ray Deck Hi ahh I didn't see that one. This has caught me out in the past. Thanks Ray.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback