Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Haversine Formula - Conversion into suitescript or saved search
hi Everyone,
would anyone know how to translate this into suitescript code or alternatively a saved search created within the Netsuite UI ?
SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * sin( radians( lat ) ) ) ) AS distance FROM markers HAVING distance < 25 ORDER BY distance LIMIT 0 , 20;
this is the google maps haversine formula and i figure it would be possible to create via a suitelet, but would you think this is possible via a saved search from within the UI ?
anyhelp greatly appreciated
0