Fetch value from a Glide List field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2019 04:00 AM
Hi All,
I wanted to fetch the field value from a source table (type- Glide list) in an on load client script.based on that I have to perform certain operations in the target catalog item form.
Source Field:
----------------
Probable Target Fields:
-------------------------------
Thanks,
Sambit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2019 04:46 AM
g_form.getValue() of glide list returns the sys_id of choices.
If you want to get the display name if choices then you need to write the GlideAjax and script include to query on that table to get the display_name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2019 05:19 AM
Ok thanks for the info.
It's good to note that one has to set the client script's "Isolate script" field to false in order to be able to use this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2019 06:12 AM
Hi Guys,
Thanks for the quick input.I tried to achieve the same through glide ajax and Script include but could not fetch the value from the glide list field.
Thanks,
Sambit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2019 06:44 AM
Hi Manas,
Can you help me to provide the sample code for the same.My script does not seem to work properly.So I deactivated the same.
Thanks,
Sambit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2019 06:52 AM
Hi Sambit,
can you share the script include and client script here?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader