- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 04:47 AM
Hi all,
Is there a way to get a current catalog item into reference qualifier of variable ? I tried current.sys_id, current.sc_cat_item.sys_id, g_form.getParameter("sys_id") but got no luck.
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 04:54 AM
Hi,
You have to create a variable like "v_cat_id" and populate its values using onLoad catalog client script:
g_form.setValue("v_cat_id", g_form.getParameter("sys_id"));
Once done, use this variable for reference qualifer.
new SIName().functionName(current.variables.v_cat_id);
Hope this will fit your need!
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thank you
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 04:54 AM
Hi,
You have to create a variable like "v_cat_id" and populate its values using onLoad catalog client script:
g_form.setValue("v_cat_id", g_form.getParameter("sys_id"));
Once done, use this variable for reference qualifer.
new SIName().functionName(current.variables.v_cat_id);
Hope this will fit your need!
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thank you
Cheers
Alberto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2019 03:45 AM
Thank you Alberto,
Your solution is correct, I just updated the script in catalog client script a little bit as g_form.getParameter function is not recognized in SP.
Detail in the below thread
Adventures in Service Portaling: Populate Catalog Variable Values through the URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 05:07 AM
Please try below code in reference qualifier of variable,
javascript:current.cat_item.sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 06:27 AM
this should be sufficiently close
use instead:
javascript:cat_item=current.sys_id
assuming this is looked catalog item only.