Using sets in layouts
Summarize
Summary of Using Sets in Layouts
This guide details the display options and settings available for using sets in layouts within ServiceNow. It outlines how sets can be configured for effective data representation, enhancing user interaction and administrative control.
Show less
Key Features
- Display Types: Sets can be shown as table rows, table columns, list rows, or via set repeaters, with options for managing how they are displayed in the Layout Wizard.
- General Settings: Control formatting through options such as expand direction (rows or columns), maximum height, index display, and vertical alignment.
- Message Settings: Customize message display, including summaries and indicators for actions taken within the set (specific to table display type).
- Size Settings: Manage the number of indexes displayed, visibility of size fields, and user input methods (number field or slider).
- Inline Control Settings: Configure controls for adding rows above or below an index and display dropdown options for size adjustments.
- Selection Settings: Applicable to list display types, allowing for single or multiple selections by toggling selectors.
- Search Settings: Enable searching within lists based on changes in a specified source field compared to a target field.
- Displaying Aggregates: Aggregate data types (Average, Count, Max, Min, Sum) can be displayed by specifying the field in the Layout Wizard.
Key Outcomes
By utilizing these configurations, ServiceNow customers can create tailored data displays that enhance usability and provide clear insights through aggregates. This flexibility improves data management and user experience across various applications.
Learn about the various ways sets can be displayed and about their settings.
Display types
- As table rows where each index is displayed horizontally:
- As table columns where each index is displayed vertically:
- As list rows:
- As a set repeater where each index is tied to a tier:
Set repeaters are distinct in their administration. For more information about set repeaters, see Creating a Set Repeater.
To manage the different display types, find the set in the Layout Wizard and select the gear icon. Here the admin has two options for Display Type: Table and List. Table is a basic grid, while List is a series of tiles.
General settings
- Expand Direction: Allows the user to specify how the set is formatted.
- Rows: Each index is displayed as a row. As the set size increases, it will expand down the page.
- Columns: Each index is displayed as a column As the set size increases, it will expand horizontally to the right.
- Maximum Height: The height of the set.
- Show Index (Table Display Type only): Whether the index is displayed in the set.
- Index Label Template (Table Display Type Only): display a prefix or suffix string to the index numbers. Helps provide context of each index.
- Vertical Alignment (List Display Type Only): Control the alignment.
- Middle
- Top
- Middle
Message settings
These options allow the admin to control how and where messages are displayed.
- Show message summary: summarizes all message actions and recommendation messages in one position. Toggling this to true will show the summary. Toggling to false, removes the summary.
-
Message summary position: display the message summary above or below the set. The following image shows Show Message Summary = true and Message Summary Position = Top.
- Show message indicator inside cell (table display type only): places a color-coded triangle in the cell that caused the message.
- Show message when hovering indicator (table display type only): displays messages when users hover over the color-coded triangle.
Size settings
The size of the set refers to the number of indexes that will be displayed. This is applicable to sets with the size type of field, not for associate picklist sets. A size of 1 means that there is 1 index. A size of 10 means that there are 10 indexes.
- Show size field: shows or hides the size field.
- Show Increment Size Button: control whether the green + icon is visible.
- Size Field Display Type: Pick between a number field or a slider field for user input.
- Placement of Size Field: Control the location of the size field relative to the set itself.
- Submit Size Changes on Field Input (Table Display Type Only): When true, the set adjusts according to any keystroke change in the size input field.
- Display a Confirmation Before Submitting Size Changes (Table Display Type Only): This property displays the confirmation button when set true. False hides the confirmation button.
Inline control settings
These settings refer to options in the index column menus.
- Show Add Button Before an Index: showAddBefore: show/hide the Add Row Above control.
- Show Add Button After an Index: showAddAfter: show/hide the Add Row Below control.
- Show Dropdown Controls: show or hide the inline size control menu.
The dropdown controls setting refers to the caret icon on the index. It is not to be confused with the green bar for inserting indexes. Add Row Above and Add Row Below refer to the other controls here.
Selection settings
Selection settings apply only to the list display type. These controls affect how the user interacts with a set that is displayed as a list.
- Show Selector: toggles selectors on and off.
- Selection Type: choose between Single or Multiple. Single will appear as radio buttons and Multiple will appear as check boxes.
Example of single selection where Show Selector is true:
Example of multiple selection where Show Selector = false:
- Boolean field for selection: specify a field in the set that will be marked as true. This is required for the selection to work. If desired, the value can be displayed in the set itself:
Search settings
Search settings apply only to the list display type.
Search settings (List display type only)
- Source Field: The global field that, when the user changes, triggers the UI to search based on the value of the field.
- Target Field: The set subfield that has its value compared to the source fieldʼs value to determine whether it is a match.
Displaying aggregates
Aggregates are a way to evaluate the data in a set. Set aggregates have five types and can aggregate on any field type. The types are:
- Average
- Count
- Max
- Min
- Sum
For example, a sum aggregate on a number field will add all the instances of that subfield across all indexes. The admin can display that aggregate just as with any other field in the layout by specifying the field in the Layout Wizard.
The variable name for aggregates have the following syntax: set.{set variable name}.{aggregate variable name}