We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Get Latitude Longitude on contact/user table

RenukaV_Extprz
Tera Contributor

Hello Team,

How can I fetch the Latitude Longitude on user table.

Can you help me with the complete steps to achieve this.

Also once I get the Latitude Longitude on the user table, I need to fetch the 3 nearest locations from the contact's location.

Thank you in advance.

6 REPLIES 6

Ankur Bawiskar
Tera Patron

@RenukaV_Extprz 

those 2 fields are not auto-populated by instance.

Those fields are used in Field Service Management when field agent works on field.

If you want to populate those then check this link

Get Current Latitude Longitude 

Also if you want to set it based on User's location using the location field then check this link

To get latitude, longitude,timezone and UTC offset on the basis of location address 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Dr Atul G- LNG
Tera Patron

Hi @RenukaV_Extprz 

 

We are currently doing something similar. To avoid any issues with location, we are using the API to fetch the longitude and latitude of the location and then adding it to the table. If the client already has this data, it can also be added manually.

 

https://www.servicenow.com/community/itsm-articles/to-get-latitude-longitude-timezone-and-utc-offset...

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

SwamyM
Giga Guru

Hi @RenukaV_Extprz,

 

To fetch latitude and longitude on the ServiceNow sys_user (User) table, enable the Geolocation plugin, which adds tracking fields and populates coordinates via browser geolocation
https://www.servicenow.com/docs/r/servicenow-platform/c_Geolocation.html


Install the Geolocation plugin (com.snc.geolocation)
https://www.servicenow.com/docs/r/zS6yb8e~gR8BPjeviYdV9g/s6U5RsE87Bb2SNQBwuTpBg

Refer below video for additional details 
https://youtu.be/Ws2a5VLtZa0

Please accept my solution or hit helpful if i have provided useful info.
Swamy


This video gives you a clear explanation of how to find latitude and longitude using the GEO location.

RenukaV_Extprz
Tera Contributor

Hello,

I have install the Geolocation plugin, still the  Latitude Longitude values are not populating in the fields.
Can you help me with the steps to achieve this?

 

Thanks