Conditional visible Multi-Row Variable Set - ServiceNow Community
Mark Roethof
Tera Patron
Tera Patron

Hi there,

While working with the Multi-Row Variable Set on Catalog Items, a while ago I stumbled on making the Multi-Row Variable Set conditional visible. Conditional visible like having a Multi-Row Variable Set appear upon checking a Checkbox variable. While working on this I came across several Community topics which used Catalog Client Scripts to achieve this. I thought, can't this be done easier? Maybe already through a Catalog UI Policy? Similar to making a Multi-Row Variable Set mandatory?

Default behavior

When setting up a Multi-Row Variable Set, and adding this to a Catalog Item or Record Producer, the default behavior looks something like:

find_real_file.png

Conditional visible

On the Multi-Row Variable Set record itself, notice there's no visible flag for example.

find_real_file.png

Though available options which are helpful are:
1) Catalog Client Scripts
2) Catalog UI Policies

Catalog UI Policy

When adding a Catalog UI Policy and the Catalog UI Policy Actions on the Catalog Item level (not on the Multi-Row Variable Set level!), notice the available Variables on the Catalog UI Policy Action:

find_real_file.png

The Variable name field will list all Variables and all Multi-Row Variable Sets! Knowing this, is the actual gem of this whole story 🙂 Simply select the Multi-Row Variable Set within the Variable name field, set the Visible field to false, and check the Clear the field value field.
On the Catalog UI Policy, set up your condition. Because we've chosen to apply Clear the field value and Visible false, your condition on the Catalog UI Policy should evaluate to false. Read about this in one of my previous articles: Clear the field value / Clear the variable value.

find_real_file.png

Result

find_real_file.png

find_real_file.png

---

And that's it actually. Hope you like it. If any questions or remarks, let me know!

👍
If this post helped you in any way, I would appreciate it if you hit bookmark or mark it as helpful.

Interested in more articles, blogs, videos, and Share projects on Multi-Row Variable Set I published?
Multi-Row Variable Set


Kind regards,
Mark

---

LinkedIn

Comments
Mario Garcia
Tera Contributor

Something completely off the subject of this post, How did you get your browser to show the field names next to the labels? I need this sorcery 

Mahesh23
Mega Sage

Hi,

Its SN Utils extension feature

You can install this extension from chrome store

Version history
Last update:
‎12-12-2019 01:22 AM
Updated by: