logo

NJP

Exploring the Multi-row Variable Set

Import · Aug 16, 2018 · article

Clicking on the MRVS we get a new variable set record to fill out:

image

I'm now going to create three variables in my update set:

image

The users will be able to select applications along with an access level for each application. Also, we're going to want to require a business justification if they ask for "Full access" to an application, so we'll add a ui policy to make that field mandatory. Note: Because the variable is located in the MRVS and will show up as a table you cannot toggle the visibility with a ui policy.

Testing the MRVS

Now it's time to test it out! Clicking on the Try it button on the catalog item will bring up the item front end with the rendered variables. You can see that our Access list variable set has a table with no current entries in it.

image

Hitting the add button will bring up a modal with the three variables we defined inside the variable set, so we'll fill those out and click add.

image

Now you can see that we've got a row for that entry.

image

Now we'll add another row, but this time change the access level to full access, which will trigger our ui policy to make the Business justification field mandatory.

image

And then we'll add another entry and end up with 3 different rows in our multi-row variable set.

image

We can also edit or remove rows by clicking the pencil and x icons under the actions header in the table.

From here we can order the catalog item and let the workflow take over. In the workflow, we may want to do things like send approvals to various people based on the different applications selected, automate the provisioning of this access, or create tasks dynamically for each of these applications and access.

See my next post: Scripting the Multi-row Variable Set

Labels:

View original source

https://www.servicenow.com/community/developer-blog/exploring-the-multi-row-variable-set/ba-p/2291532