pre-selected value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2025 03:10 PM
Hi,
How to pre-selecte value on New Location field with the only one available value.
and my field New Location is Reference
i didn't know how to do that ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 01:29 AM
Hi Medi,
I tried your solution but in my code source i am blocked :
i dont' know how to say to select juste one selection when field location has juste one display
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2025 09:23 PM
I believe you want location to be auto populated when form loads
With what location it should be populated?
With logged in user's location?
If yes then use this in default value of that field
javascript: gs.getUser().getLocation();
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
03-05-2025 01:29 AM
Hi Ankur,
I tried your solution but in my code source i am blocked :
i dont' know how to say to select juste one selection when field location has juste one display
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2025 06:47 PM
please share complete script and some screenshots of your form and exact requirement
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader