How to retrieve variable value from catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2022 06:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2022 07:11 AM
Hi Deepa,
If client side, the standard g_form.getValue('<fieldname>'); should return the value.
If in a workflow / server-side you would want to use current.variables.<fieldname> to return the current value.
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2022 04:48 AM
var requestItem = new GlideRecord('sc_req_item');
requestItem.addQuery('cat_item.nameSTARTSWITHPrinter ');
requestItem.addEncodedQuery('number='+current.number);
requestItem.query();
while(requestItem.next())
{
gs.addInfoMessage(requestItem.variables.queue_name.getDisplayValue()); //this value displaying info message
current.variables.queue_name.SetDisplayValue(requestItem.variables.queue_name.getDisplayValue()); //but it didnt display into the field Queue Name.
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2022 07:16 AM
Hello,
Can you share the script you are using it would be easier to assist you.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2022 07:48 AM
Hi,
Seems there is some client script or UI policy which is running on RITM level and clearing the value
Did you debug that?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader