Variable Types
| Service Catalog Management |
|---|
| Related Topics |
| Get the Book |
| |
1 Overview
The service catalog supports several types of service catalog variables. Some types also accept variable attributes.
2 Using Variable Attributes
Some variable types support specific variable attributes, which can be entered in the Variable attributes field.
If multiple attributes are supported for a variable type, they can be specified in this field, separated by commas.
The following descriptions list the attributes supported for each variable type.
3 Break
Displays a horizontal line across the form. Breaks are formatting elements; no data is collected.
4 CheckBox
Creates a check box that may be selected or cleared. List check boxes in order under a label to create a multi-option question (as shown in the example).
5 Container Start, Container End
A container is a question that holds other questions, similar to a variable set. Unlike a variable set, containers can be used anywhere (including inside a variable set) and can be nested (a container inside a container).
Containers offer:
- Additional layout options: for example, to lay out questions in two columns. Note that check boxes must be wrapped with individual containers in order to be used in a two-column container.
- A collapsible title bar: to save screen real estate.
To put questions in a container, add container start and container end variables before and after the questions (in order). For example, create the container in the example with variables in the following order:
- Container Start (Memory & CPU Options), 50
- CPU Speed, 100
- Memory, 200
- Container End, 250
To format the container as shown in the example, do the following in the container start variable:
- Select a Layout of 2 Columns Wide, alternating sides.
- Select the Display title option to use a collapsible title bar.
6 Date
Creates a date input widget.
7 Date/Time
Creates a date and time input widget. Times are stored in Greenwich Mean Time (GMT) and are displayed in the current user's time zone.
8 HTML
HTML variables are useful for providing additional content for an item that requires more advanced formatting, including images. HTML variables are available in the Calgary release.
The variable can be:
- Used for user input.
- Used for reusable content when put into a variable set (for example, terms and conditions).
- Editable or read-only to end users, based on entitlements.
- Rendered without a title or border if it has no Question value and is read-only by entitlement (not by policy or script).
| Note: HTML variables are not currently supported for display on the shopping cart summary or approval summary screens. The available in summaries field is hidden on the variable form if the type is "HTML". |
9 Label
Displays a label across the form. Use labels to separate questions into sections (example, left) or list check boxes in order under a label to create a question for which the user can select several options (example, check boxes).
Labels are formatting elements; no data is collected.
10 List Collector
Uses the list collector (slushbucket) interface to add multiple records from a table.
Supported attributes for this variable type:
- no_filter: hides the filter fields that appear above a list collector.
| Note: This attribute is not a standard dictionary attribute, but is specific to the service catalog. |
11 Lookup Multiple Choice
Creates radio buttons using data from a table. Functionality is similar to lookup select box, which creates a choice list from queried data. Define the query with:
- Lookup from table: table from which to query data.
- Lookup value field: field in the lookup table that populates the default variable value.
- Lookup label field: field names (comma-separated list) that define the user choices.
- Reference qual: supports reference qualifiers and advanced reference qualifiers. Returns all matching results (no maximum).
- Choice direction: allows you to layout options horizontally (selecting Across), or vertically (Down), as shown in the screenshot.
Supported attributes for this variable type:
- ref_qual_elements
For more information, see the available attributes list.
12 Lookup Select Box
Creates a choice list using data queried from a table. Functionality is similar to lookup multiple choice, which creates radio buttons from queried data. Define the query with:
- Lookup from table: table from which to query data.
- Lookup value field: field in the lookup table that populates the default variable value.
- Lookup label field: field names (comma-separated list) that define the user choices.
- Reference qual: supports reference qualifiers and advanced reference qualifiers. Returns all matching results (no maximum).
For example, to create the lookup select box in the picture, enter the following values:
- Lookup from table: Incident [incident]
- Lookup value field: Sys ID
- Lookup label field: number, category, priority
- Reference qual: caller_id=javascript:gs.getUserID()^active=true
Also see Select Box.
Supported attributes for this variable type:
- ref_qual_elements
For more information, see the available attributes list.
13 Macro
Inserts a UI macro into the catalog item.
Note: UI macros in the service catalog do not support the following glide_list functions: clickthrough, slushbucket editing, and email field.
14 Macro with Label
Inserts a UI macro with a label.
15 Multi Line Text
Creates a multiple-line text input widget.
16 Multiple Choice
Creates radio buttons for question choices.
To lay out options horizontally, set Choice direction to Across.
17 Numeric Scale
Creates a horizontal set of radio buttons with numeric options from Scale min to Scale max (a Likert scale).
18 Reference
References a record in another table, similar to a reference field. For example, a variable named point_of_contact may reference the User [sys_user] table.
To set up a reference variable, define the question and select the Reference table.
Supports reference qualifiers and advanced reference qualifiers.
Keep the following information in mind as you work with reference variables:
- Reference variables use the auto-complete feature, however the auto-complete display attributes for reference fields do not apply to variables. To ensure users have enough information, personalize the reference lookup list.
- Clickthrough is not supported for reference variables.
- Reference variables store the sys_id of the selected record (like reference fields). To use the display value in a script, use the same methods as for a reference field (current.variables.<variable name>.getDisplayValue() or current.variable_pool.<variable name>.getDisplayValue()).}}
Supported attributes for this variable type:
- ref_auto_completer
- ref_ac_columns
- ref_ac_order_by
For more information, see the available attributes list.
19 Select Box
Creates a choice list from pre-defined question choices.
Also see Lookup Select Box.
20 Single Line Text
Creates a single-line text input field.
Supported attributes for this variable type:
- max_length: set the maximum character length. For example: max_length=200. The maximum value for max_length is 4000.
| Note: This attribute is not a standard dictionary attribute, but is specific to the service catalog. |
21 UI Page
Inserts a UI page into the catalog item.
22 Wide Single Line Text
Creates a single-line text input field that spans the form, allowing for longer input.
Supported attributes for this variable type:
- max_length: set the maximum character length. For example: max_length=200. The maximum value for max_length is 4000.
| Note: This attribute is available with the Aspen release. This is not a standard dictionary attribute, but is specific to the service catalog. |
23 Yes/No
Creates a choice list with Yes and No as options.