- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2025 09:12 AM
Hi
I am using a reference qualifier condition on a variable in the multi row variable set "javascript: new global.skilUtil().getUser(current.variables.requested_for);" and requested_for is a variable but the current.variables.requested_for is actually sending undefined value. Could you please help me is there anything wrong and need to be changed.
Thankyou
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2025 10:11 AM
Hi @Sagar Rd ,
The current in the MVRS refers to just the MVRS.
you can refer to the Scenario 2 in the below blog and create a onload client script on the MVRS and store the
requested_for value as a session client data and give it a unique name
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2025 10:51 AM
Hi @Sagar Rd,
Try this:
- Adjust your reference qualifier: (Please use your requested_for variable name)
javascript: new global.skilUtil().getUser(session.getClientData("requested_for"));
- Create OnLoad Catalog Client Script on your Variable Set:
function onLoad() {
var catItemVarName = 'requested_for'; //PLEASE REPLACE THIS WITH YOUR REQUESTED FOR TECHNICAL NAME
var catItemVarValue = g_service_catalog.parent.getValue(catItemVarName);
var ga = new GlideAjax('RefQualifierClient'); // PLEASE USE THE SCRIPT INCLUDE WHICH IS CREATED IN NEXT STEP
ga.addParam('sysparm_name', 'setSessionData'); //function in script include
ga.addParam('sysparm_cat_item_var_name', catItemVarName);
ga.addParam('sysparm_cat_item_var_value', catItemVarValue);
ga.getXMLAnswer(getResponse);
}
function getResponse(response) {
//do nothing
}
Create a Script Include (Client Callable / Glide AJAX enabled) - In my example, I named it "RefQualifierClient"
Add the following function to your script include:
setSessionData: function() {
var catItemVarName = this.getParameter('sysparm_cat_item_var_name');
var catItemVarValue = this.getParameter('sysparm_cat_item_var_value');
var session = gs.getSession().putClientData(catItemVarName, catItemVarValue);
return;
}
I hope it helps!
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2025 10:51 AM
Hi @Sagar Rd,
Try this:
- Adjust your reference qualifier: (Please use your requested_for variable name)
javascript: new global.skilUtil().getUser(session.getClientData("requested_for"));
- Create OnLoad Catalog Client Script on your Variable Set:
function onLoad() {
var catItemVarName = 'requested_for'; //PLEASE REPLACE THIS WITH YOUR REQUESTED FOR TECHNICAL NAME
var catItemVarValue = g_service_catalog.parent.getValue(catItemVarName);
var ga = new GlideAjax('RefQualifierClient'); // PLEASE USE THE SCRIPT INCLUDE WHICH IS CREATED IN NEXT STEP
ga.addParam('sysparm_name', 'setSessionData'); //function in script include
ga.addParam('sysparm_cat_item_var_name', catItemVarName);
ga.addParam('sysparm_cat_item_var_value', catItemVarValue);
ga.getXMLAnswer(getResponse);
}
function getResponse(response) {
//do nothing
}
Create a Script Include (Client Callable / Glide AJAX enabled) - In my example, I named it "RefQualifierClient"
Add the following function to your script include:
setSessionData: function() {
var catItemVarName = this.getParameter('sysparm_cat_item_var_name');
var catItemVarValue = this.getParameter('sysparm_cat_item_var_value');
var session = gs.getSession().putClientData(catItemVarName, catItemVarValue);
return;
}
I hope it helps!
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2025 03:50 PM
Thankyou @Medi C