- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2022 10:40 AM
Looking for some help or directions with my issue. I have a catalog item request where one of the variables is a reference field to the maintain item list. I am looking to re-direct the user to the specific item after they make the selection. I can make it happen if I hard code the link but I wanted to create a dynamic link that capture the correct sys_id of the selection.
I have created an onChange catalog client script to check when the field change.
var SysId = g_form.getValue('software_items'); //name of the variable
if (newValue !== 'none') {
var url = https://dev69851.service-now.com/sp?id=sc_cat_item&sys_id=' + SysId + '&sysparm_category=69d0e41b1b5f8150a190ece0f54bcb4e',
_blank;
top.window.open(url, "_blank");
}
}
where it says I need the sys_id of the selection
Any help will be appreciated it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2022 11:47 AM
You can use the name in label field and if need it at client end use g_form.getDisplayValue('var_name');
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2022 11:40 AM
Hi,
In "Lookup Select Box" configuration for the value field you can make it sys_id then it will work.
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2022 11:45 AM
Hi Saurabh,
You mean use the sys_id instead of the name?
But this will return the sys_in on the list and not the name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2022 11:47 AM
You can use the name in label field and if need it at client end use g_form.getDisplayValue('var_name');
Thanks and Regards,
Saurabh Gupta

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2022 11:02 AM
I think you should be using an order guide and associate catalog items based on the condition it should show.
Please mark this response as correct or helpful if it assisted you with your question.