Display Multi variable set on selection of it in the catalog item

Loganathan Keer
Tera Contributor

I have requirement to display the multi row variable set on the basis of selection of it in a list collector field. How do I achieve this via Client Scripting

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

@Loganathan Keer 

you want to show/hide entire MRVS?

if yes then simply create onChange on list collector and use this syntax

g_form.setDisplay('mrvsVariableSetName',false);
// OR this
g_form.setVisible('mrvsVariableSetName',false);

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

@Loganathan Keer 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Robert H
Mega Sage

Hello @Loganathan Keer ,

Just to understand the context:

  • You have a list collector on your form that references the Variable Sets table, with the filter Type = Multi Row?
  • And then you have related all those Multi Row Variable Sets to the Catalog Item itself?
  • And if the user selects one or multiple MRVS in the list collector you want those particular MRVS to be made visible?

Is that correct?

How many of those MRVS are applicable to this Catalog Item? If it's just a few, have you considered using check boxes instead of a list collector to make this a bit more user friendly? You could then create an onChange Client Script for each check box. If its checked it would execute code similar to what @Ankur Bawiskar has shown.

 

Regards,

Robert