Client script : get the value of List Type field value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2021 04:20 AM
I am seeking for any direct method to get the Display Value of Glide List type of field on client script.
I tried using g_form.getValue('Skills'), but it gave me Sys ids list seperated by commas(',').. I don't want to call GlideAjax to get the value from Data base script as it takes little more time to process.
See image below
Wondering if we have any direct method to get on g_form object.
Thanks,
- Labels:
-
Customer Service Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2021 04:25 AM
Hi,
Please find the below link:
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2021 04:48 AM
Hi Anil,
Unfortunately, It couldn't help as I am working in scoped application. $ is not allowed in scoped app.
Any other ways I can try out ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2021 04:46 AM
just use this link for the solution; it uses DOM manipulation which is not recommended
can we display list field values in the alert message
Sharing the script here
1) Ensure Isolate Script Field is set to false for your client script to allow DOM
2) This field if not on form then from the list you can make it false
var field = 'work_notes_list';
var values = $(g_form.getTableName() + '.' + field + '_nonedit').innerHTML;
alert(values);
Output: It gave me 2 user's display value
Regards
Ankur
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-20-2021 04:56 AM
Hi Ankur,
Unfortunately, It couldn't help as I am working in scoped application. $ is not allowed in scoped app.
Any other ways I can try out ??