alert(g_form.getValue('assignment_group'));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 03:47 PM
alert(g_form.getValue('assignment_group'));
I am getting sys_id but I need a display value of it. For example the Assignment Group value is 'CAB Approval' it should be display a CAB Approval it should not be a sys_id of 'CAB Approval'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 06:46 PM
Hi @Sarah Bouil ,
Try the getDisplayBox with value property. For example,
var group = g_form.getDisplayBox('assignment_group').value;
Thanks,
Anvesh
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 08:40 PM
Hi Anvesh,
Try using g_form.getDisplayBox('assignment_group').value); which gives you display value
Regards,
Shyamkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 08:46 PM
This is for normal form or catalog form?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 01:33 AM - edited 04-05-2023 01:33 AM
Hi @Sarah Bouil Paste this script in your client script you will get alert of the display value.
alert(g_form.getDisplayBox('assignment_group').value);
Output:
If my solution helps you please mark my Solution Accepted and Helpful.
Thanks and regards
Uday Kumar Valapudasu