- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2018 07:23 AM
My client uses the Locations table in order to provide a mapping of all servicable assets for our technicians. However, a new request has come in to be able to search for these locations based on the input of coordinates. They are asking to narrow down to locations nearest to inputted coordinates with maximum distance of 500 meters.
Is there a script that can help calculate distance and convert that to meters?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2018 08:44 AM
Check if this is helpful
https://stackoverflow.com/questions/5260423/torad-javascript-function-throwing-error
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2018 11:15 AM
It was. Looks like the toRad/toRadians function is not defined within ServiceNow, but there was this equation which I ended up using:
this * Math.PI / 180