Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Determining if you are using the correct container variable - Known Error
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Determining if you are using the correct container variable
KB0539982

Determining if you are using the correct container variable


28665 Views Last updated : Jan 26, 2025 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Issue

Determining if you are using the correct container variable to avoid:

  • Variables appearing in the wrong place
  • Variable not alternating as expected


Release

All versions

Resolution

To configure container variables, navigate to the Variables related list on the Catalog Item form.

  • This list can contain a combination of container records and variable records.
  • The order of these records is important as it affects how they are rendered on the form.

This example shows an item with four variables and no containers:



If no containers are defined, the item view shows them rendered top to bottom, in increasing order:


To control the layout to use anything other than the top-to-bottom linear format, container records are needed.


Using containers

There are several methods for using containers to control layout.

Method 1: Use the <Container Start> - <Container Split> - <Container End> Formation

In this formation, variables appear in the first column, ordered from top to bottom until the split appears. After the split, the variables appear in the second column, ordered from top to bottom in that column.

For example, if you set up your containers as follows:


The item appears as follows:

Having multiple splits within the same start-end formation does not make any impact. Only the first split is recognized.

To have multiple splits, set up a second start-split-end formation nested inside the first. For example:



This helps you create three columns:


It is not necessary to set up containers right at the top of the variables. Any variable outside the containers is rendered using the full width across the two columns. For example:



Renders as: 



Method 2: Use the <Container Start> - <Container End> that is using '2 column wide, alternating sides' formation 

To set this up, open the Container Start record, then in the Type Specification tab, set the Layout field to 2 columns wide, alternating sides.




There is no need for a split, as each variable is rendered on alternative sides. The first variable is on the left side, then the next is on the right-hand side, the next is left, and so on. For example:




Renders as:




Using an odd number of variables means the left-hand side has one more.

Method 3: Use the <Container Start> - <Container End> that is using '2 column wide, one side, then the other' formation 

To set this up, open the Container Start record, then in the Type Specification tab, set the Layout field to 2 columns wide, one side, then the other.





Similar to the last formation, this type of formation does not need a <container split> because the split is done evenly halfway through. If there is an odd number of variables to render, then the right-hand side renders one more variable.

For example:




Renders as: 


Containers and variable sets

The previous descriptions assume that there are no variable sets being used. However, variable sets can also contain containers. Variable set containers offer the flexibility of defining layouts using two mechanisms:

  1. The same standard three formations as for variables. 
  2. Specifying the layout on the variable set itself, without using containers at all (also see Defining Variable Set Layout).



Ensure that you specify an order both on the variable set and also on its variables to get the desired layout.





The ordering fields left empty have an impact on the layout. To fully understand the impact, see Defining Variable Set Order.


Related Links

Possible container pitfalls are:

  • Inactive containers: While the containers and their ordering may appear completely correct, it may be that some of the ordered components are inactive. If all of the above is setup well and you have followed the troubleshooting steps, it is useful to bring up the active column on the variable related list. This will show if there are any inactive components that are throwing off the layouts.
  • Poorly ordered containers: For example, Container End with an order smaller than Container Start is likely to render badly. Similarly, a container split that is not ordered between the Container Start and Container End will not render as expected. You should ensure that the order of Container Start is less than that of Container Split, which is less than that of Container End.



The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.