We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Mark Roethof
Tera Patron

Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

 

Hi there,

 

A hugely popular question on the ServiceNow Community when it comes Multi-Row Variable Sets: "How can I hide a variable from the grid view of Multi-Row Variable Set within a Catalog Item?" For years, the answer has always been simple: you can't.

 

Then came the Australia family release. Now you can, out-of-the-box!

I did a bit of testing and tried to sum up the working (and findings), as I was not able to find a proper ServiceNow Docs page on this.

 

Let's have a look!


Australia release notes

"Configure variable visibility on multi-row variable set grids
Configure the visibility of a variable on the grid layout within a multi-row variable set (MRVS) for a catalog item by using the Hide on grid check box. By default, the check box is not selected."

 

Aussie Grid 01.png

 

Hide on grid
When opening a Variable that belongs to a Multi-Row Variable Set, you might notice there's a new field: "Hide on grid". This is the most visible part of the new functionality introduced in the Australia family release and is the field developers will use to control the visibility of variables in the Multi-Row Variable Set grid.

 

Aussie Grid 02.png

 

Don't see the Hide on grid field? Verify that the field exists on the table's Dictionary. If it does, there's a good chance it simply wasn't added to the Form Layout. This can happen when the Form Layout was customized in the past. In that case, during the upgrade to the Australia family release a Skipped Record would have been generated.

 

Portal

To test the Variable visibility on a Multi-Row Variable Set, I created a simple Catalog Item with a Multi-Row Variable Set attached containing four Variables. Each Variable is configured a little bit differently, a combination of Hide on grid true/false, Mandatory true/false, and Hidden true/false. This will demonstrate the various behaviors.

 

Aussie Grid 03.png

 

When viewing the Catalog Item on a Portal, the Multi-Row Variable Set grid is only showing Column 1 and Column 4 with the above configuration. This is exactly what we'd expect for Column 1, as the Hide on grid field is not selected. Column 4 is a bit more surprising. Although the variable has Hidden set to true, it is still displayed in the grid because Hide on grid is false. In other words, the Hidden field does not affect the visibility of the variable in the Multi-Row Variable Set grid. Column 3 is not displayed because Hide on grid is true, even though the variable is Mandatory. The Mandatory property has no influence on whether a variable is shown in the grid.

 

Aussie Grid 04.png

 

When adding a new row or editing an existing row in the Multi-Row Variable Set, the visibility behavior on the modal is slightly different. This behavior is expected and matches how variable visibility worked prior to the Australia family release.

 

Aussie Grid 05.png

---

 

That's it. Finally I finished this article, it was already pending for a while 😅Hope you like it. If any questions or remarks, let me know!

 

C

If this content helped you, I would appreciate it if you hit bookmark or mark it as helpful.

 

Interested in more Articles, Blogs, Videos, Podcasts, Share projects I shared/participated in?
- Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

 

Kind regards,


Mark Roethof

Independent ServiceNow Consultant
11x ServiceNow MVP

---

LinkedIn

Comments
Carl Fransen1
Kilo Sage

Can you provide some real world examples of where you would use this?

-O-
Kilo Patron

It is useful the same way as HTML form hidden inputs are. Like a sort of row level scratchpad. E.g. you want to relate each row in the MRVS with some foreign records, so you may want to create a Correlation ID field, which should not be visible to the user.

Version history
Last update:
3 weeks ago
Updated by:
Contributors