how to get to current Catalog Item in a Variable set of variable by Reference Qualifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2023 12:39 AM - edited 06-12-2023 07:25 PM
hello I want to know how to get the current catalog item in a variable set of variable reference qualifier?
I create to the variable set and create to variable field in the variable set.
the variable type is reference, I want to get the current catalog item sysid by script include.or
other method?
thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2023 12:48 AM - edited 06-12-2023 12:50 AM
@chunn ,
You can create a reference qualifier for the field.
javascript:current.variables.sys_id
This must help !
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2023 01:23 AM
thank you reply for me but i try it. it is not work.
I set to the variable field in the varialbe set. how to get to the catalog item the sysid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 12:08 AM
May i know wat did you try ?
You must use this in the default value:
javascript:current.variables.sys_id
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2023 01:01 AM
Hi @chunn ,
Write below code in onLoad Client Script and try.
var catItem=g_form.getParameter("sysparm_id");
g_form.setValue('variable_name',catItem);
Please refer the below links.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0723775
Please mark my answer as correct and helpful if it helps you.
Regards,
Namrata