- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 09:45 PM
Hi,
I have created a Scriptinclude and onChange client script but it is not working, i suppose to set the user's location.
but it is not happening.
onChange Client script:
Scriptinclude:
User form:
If i select user from the reference then location is not auto populating.
Thanks,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 10:04 PM
Hi Kranthi,
Please make sure to include the function name you're calling from the Script Include in your Client Script.
You can add the following line after line 7:
<< - add this--> ga.addParam('sysparm_name', 'populateLocation');
Give it a try and let me know how it goes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 10:46 PM
what's the business requirement to have user reference field on sys_user table itself?
Are you trying to learn and explore something or this is for a customer's requirement?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 11:53 PM
Here, it is not a business requirement i am learning for my self from basic level.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 12:08 AM
then link I shared talks how to use correct GlideAjax, refer that and fix the code please
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 10:52 PM
Hello @kranthi2 ,
Yes, that is understood, but what's the logical reason for having a user's location being populated from another user?
This is highly unusual.
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 11:54 PM
Hi @Robert H These is no logic here i am learning this Glideajax by creating 2 fields and populating the location based on the user is selected into the UserName
Can you please help me