Need to know how to pass catalog item variable value in Muliple Row Variable Set variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2024 12:55 AM
Hi Team,
I have searched a lot of ways but nothing works. Would like to know in details how catalog item form variable can be made accessible in MultiRow Variable set. I have tried with session variable but not sure how it works. Any detail solution will be helpful as I am new in using MRVS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2024 10:57 PM
Hi @saikatmitra6919 ,
I recently encountered a limitation with the Multi-Row Variable Set (MRVS) in ServiceNow, where it cannot directly access form variables. For example , if you have a catalog item form with a 'Requested For' field and an MRVS, it's not possible to pass the value of the 'Requested For' field into the MRVS scope. This poses a challenge when trying to script or apply filter criteria for MRVS variables.
To work around this, I found that using the browser session to store and retrieve catalog form values can be an effective solution:
- Storing the value in session storage:
sessionStorage.setItem("requested_for", g_form.getValue('requested_for'));
- Retrieving the session value:
var req_for = sessionStorage.getItem("requested_for");
This method allows you to pass the form variable values into the MRVS scope indirectly.
If my response helps you resolve your issue. Kindly mark it as helpful & correct. It will be helpful to future readers
Regards ,
Sriharsha .