- 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:01 PM
your GlideAjax syntax is wrong, you are not calling the function itself
check these links and update
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: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:10 PM
Hello @kranthi2 ,
Apart from the scripting issue, can you please explain what you are trying to achieve, i.e. what is the requirement?
I see you have created a custom reference field "User Name" on the User table itself. What is the purpose of referencing a User with another User here?
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 10:12 PM
Hi @Robert H
I want to achieve that If any user is selected then location should be auto populate.
Thanks