The CreatorCon Call for Content is officially open! Get started here.

Need to know how to pass catalog item variable value in Muliple Row Variable Set variable

saikatmitra6919
Tera Contributor

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.

1 REPLY 1

SriharshaYe
Kilo Sage

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 .