OBLYTECH Logo
OBLYTECH Logo

Multi-Row Variable Sets in ServiceNow: Setup, Rules and Limits

A multi-row variable set (MRVS) captures repeated catalog questions in a grid: each row represents an entity, and each column holds one of its attributes. Use it for grouped requests such as hardware configurations. Set up the columns, row limit and validation together, then test how fulfillment receives the submitted data.

For the general concept, read how variable sets work in general. Wider catalog guidance sits under request fulfilment and service catalog.

What a multi-row variable set does on a catalog item

A multi-row variable set puts catalog questions into a grid. The questions are the columns, and the requester adds one row per entity and fills in the same columns on each row. A request for a group of similar things fits this shape: a laptop for each member of a team, or a list of equipment going to several sites. On the catalog item, each row holds one set of values for all the variables in the set, and the columns follow the order in which the variables are defined in the set.

The set sits on the catalog item form as one unit. A variable set is a discrete unit with an order number by default, and all of its variables appear wherever the set is included. Each set can use one of three layouts. The first is one column wide, with variables stacked from top to bottom. The second is two columns wide, with variables placed alternately in the left and right columns. The third is also two columns wide, but the first half of the set fills the left column in sequence and the second half fills the right.

A variable set can be used by more than one catalog item, and the order of its variables can be defined for each item.

Single-row or multi-row: when the grid fits

The grid fits when the same questions repeat for each item the requester is ordering. When the questions are a one-off, a single-row set or plain variables on the item keep the form simpler, and the grid adds little.

The places where MRVS support drops off matter more than the choice of type, so check them before committing to a grid.

Creating the set and attaching it to an item

To create a variable set, go to All > Service Catalog > Catalog Variables > Variable Sets and select New. Select Multi-Row Variable Set, which sets the Type field to Multi Row and makes the set capture its data in a grid. To attach the set to a catalog item, open Service Catalog > Catalog Definition > Maintain Items, open the item, and click Edit in its Variable Sets related list.

Use an administrator or catalog administrator to create the set. Catalog editors and catalog managers can attach existing sets to items assigned to them; those roles do not grant permission to create the set. The attachment procedure accepts catalog_admin, admin, catalog_editor or catalog_manager.

  1. Enter the Title, Internal name and Order. Choose an internal name that differs from other sets on the item, and avoid variable names that match a set’s title or internal name.
  2. Save the set, then use New in its Variables related list to create the columns. Their order follows the variable order in the set.
  3. Add the set through the item’s Variable Sets related list, save, and select Try.
  4. Select Add in the grid, enter values in Add Row, and select Add again. Use the edit row icon in Actions to change a row, then Save.

Check a second row with different values, rather than accepting one successful entry as proof that repeated data works. Scripts should reference the set’s internal name, so record it alongside the column definitions.

Variable types and fields a multi-row set rejects

Not every variable type can sit inside the grid. The following types cannot be included in a multi-row variable set:

  • Attachment
  • Break
  • Container Start, Container End and Container Split
  • HTML
  • Label and Rich Text Label
  • Macro and Macro with label
  • UI Page

Several other rules are narrower but affect design. Map to field is not supported, so a grid row cannot be mapped to a field on a record. Variables with read roles cannot be added to the set at all. A List Collector variable inside the set works only with the glide list interface, so plan around that when you configure it.

Two behaviors are useful when designing the columns. The Unique field on a multi-row variable disallows duplicate values, which helps when a row identifier such as an asset tag must not repeat. A variable can also be hidden so that it does not appear when the dialog is open, which is useful for values a script fills in.

Capping the number of rows with max_rows

The row limit is set with the max_rows attribute, entered in the Variable Set attributes field on the variable set. The attribute caps how many rows a requester can add, which gives the grid a clear boundary. In current releases a multi-row set accepts at most 50 rows, so a max_rows value above 50 gives requesters no extra rows.

Choose the limit from the real process, not from a round number. Ask how many entries a requester realistically submits in one go, and what happens operationally when a request exceeds that count. If a request can legitimately need more rows than the cap, the honest fix is a second request or a process change, not a bigger number.

Scripts, UI policies and visibility rules

The platform lets you define catalog UI policies and catalog client scripts for a multi-row set. The main limit is that onSubmit catalog client scripts are not supported for a multi-row set.

The scope rule matters more than the feature list. Item-level catalog UI policies and catalog client scripts are not applicable to variables in a multi-row set. Only the ones defined within the set apply to its variables.

Two more constraints affect reporting and testing. You cannot select multi-row variables in UI policy conditions or in reporting. In Automated Test Framework, the only checks available on a multi-row set are whether it is visible, mandatory or read only.

Pricing, cloning and where the data appears

If the variables carry price implications, adding, editing or removing a row updates the catalog item price. When the glide.sc.use_cart_layouts property is disabled, the Order Item Widget does not show those price changes, but they appear once the item is added to the cart.

Cloning a request that contains a multi-row set copies the set’s data into every cloned request, along with all of the set’s UI policies and client scripts. That is useful for repeat orders, but it also means a clone carries whatever the original requester entered.

Display support is uneven across channels. In the RITM and request view in Now Mobile, a multi-row set is not supported, so a requester cannot review it there after submission. The variable summarizer supports multi-row sets only in the Service Portal.

Catalog tasks and workflows: the Global limit

Variables that belong to a multi-row set cannot be marked Global. Because of that, the set is not available on catalog tasks by default.

A workflow is the route around this. Workflow Studio’s GetCatalogVariables and CreateCatalogTask actions can include a multi-row set, so a workflow can create a catalog task that carries the grid. The For Each flow logic can then step through each row and access its variables. Design the workflow before building the catalog item, because the set’s layout and the row fields the workflow expects must agree.

Test the row lifecycle before release

Use the same sequence in each supported request channel on your instance and release. Add two different rows, edit the first, remove the second, and confirm that the remaining values still describe the intended entity. Test Remove All separately, including its confirmation, so the test covers clearing the grid as well as saving it.

Next, test an empty field, a duplicate identifier and an attempted row beyond your configured limit. Check the submitted request and the resulting catalog task rather than stopping at the input form. Record what the requester entered and what the fulfiller can actually see. These checks cover gaps that a visibility-only automated test will miss.

If validation fails, locate the rule before rewriting it: an item-level script will not govern the columns inside the set. Catalog data lookups can also be defined for the MRVS, using its Catalog Data Lookup Definitions related list. Keep the lookup and validation responsibilities clear so that a populated value is still checked against the intended business rule.

For help planning this work, see ServiceNow implementation.

Questions about MRVS troubleshooting and maintenance

Why does the grid disappear inside a container?

An MRVS is not displayed when placed within a container. Move the set outside that container and test its position again before changing scripts or rebuilding the variables.

Can a reference qualifier depend on a variable outside the set?

Dependent reference qualifiers cannot use outside variables for an MRVS variable, or MRVS variables for an outside variable. For a qualifier inside the set, the current row is the row being edited. Review the dependency before debugging the returned choices.

Does hiding a column protect its values in the row list?

Visibility rules are honored on the MRVS form, not in the list. Test the row dialog and the list separately. A hidden dialog field should not be treated as a substitute for an access decision.

Why can a user lose access despite a variable’s access settings?

Access is checked at the variable set before the individual variable. A denial at the set overrides the variable’s settings. Have the catalog administrator review set-level read, write and update roles before changing individual variables.

What should be checked before changing a shared set?

Changes to a reused variable set affect its associated catalog items. Identify those items, test their row rules and fulfillment handling, and assign ownership for the shared definition before releasing the change.