Types of service catalog variables

Several types of service catalog variables are provided. Some variable types accept variable attributes. You can also provide help text to any service catalog variable.

Refer to the following sections for more details on each variable type. For details on creating a variable, see Create a service catalog variable.

Limited mobile support for variables

The service catalog on mobile devices does not support the following variable types:
  • Break
  • Container variables
  • Duration
  • Email
  • HTML
  • Label
  • List Collector
  • Lookup Multiple Choice
  • Macro
  • Macro With Label
  • Masked
  • Multiple Choice
  • UI Page
  • URL

Support in Service Portal

Unless specified, all variables are supported in Service Portal.

Break

The break variable displays a horizontal line across the form. It is a formatting element that does not collect data.

Figure 1. Example of a break variable
Example of a break variable

Check box

The check box variable lets users enable and disable options by selecting and clearing it.

To make a check box mandatory for users, select the Selection Required option when you create the variable. For example, use this option to require users to select an I agree check box for an agreement form. If users try to submit the agreement form without selecting the check box, an alert message is displayed to tell users that they must select the check box.

If you create multiple consecutive check box variables for a catalog item, the check boxes are grouped under an Options label on the item page in the service catalog. If you want to define a custom label for the check boxes, create a label variable and organize the check box variables under it.

When you create multiple check box variables for a catalog item:
  • If one of the check box variables is marked as required, users must select at least one of the check boxes from the group. An asterisk (*) is then displayed next to the label for the check boxes.
  • If the only required check box is hidden with a client script or UI policy, then users are no longer required to select at least one of the check boxes.
  • Hiding the label hides all check boxes.
Under the Type Specifications tab, you can specify the price in different currency types. Also, you can configure the price in the following pricing models:
  • Calculated
  • Fixed
  • Multiple
For information on the pricing models, see Price fields .
Figure 2. Example of a check box variable
Example of a check box variable

For more information on the check box variable, see this video:

Container start, container split, and container end

The container start, container split, and container end variables define a layout for a container that can hold more variables. Use the container start and container end variables to define the start and end points of a container layout. The container end must be used along with the container start to close a container.

A container layout can be split into two or three columns using the container split variable. By default, the split is calculated at the 50% mark.

A container is similar to a variable set. Unlike a variable set, containers can be used anywhere, including inside a variable set. Containers can also be nested inside each other.

For more help with choosing the appropriate container type, see the Determining if you are using the correct container variable [KB0539982] article in the HI Knowledge Base.

  • The container variables are not yet supported on mobile devices.
  • Container start, container split, and container end variables are supported in Service Portal. However, if the settings are done on the top-level container, a maximum of two-column layouts can be achieved.
  • Variable sets are also considered as containers. So, a container start variable with a two-column layout under a variable set is not supported in Service Portal.
To reproduce the container shown in the following figure, enter the following settings when creating a container start variable:
  • Select a Layout with 2 Columns Wide, alternating sides.
  • Select the Display title check box to use a collapsible title bar.
Figure 3. Example of a container variable
Example of a container variable

Date

The date variable creates a widget with a field and calendar for users to select a date.

Figure 4. Example of a date variable
Example of a date variable

Date and time

The date and time variable creates a widget with a calendar and fields for users to select a date and time. The time value is stored in Greenwich Mean Time (GMT) and displayed in the time zone of users.

Figure 5. Example of a date and time variable
Example of a date and time variable

Duration

This variable allows you to specify the duration for which a catalog item is available.

For attributes supported by this variable, refer variable attributes.
Note: Enter the duration in the DD HH:MM:SS format when setting the default value of the variable, and specifying in the g_form.getValue() and g_form.setValue() functions.
Figure 6. Example of a duration variable
Screenshot for the Duration variable

Email

The email variable creates a widget for users to enter and select an email address. It accepts only valid email expressions containing @ and domain information.

Figure 7. Example of a email variable
Example of a email variable

HTML

The HTML variable lets you provide content with advanced formatting, including images, for a catalog item.

Use it to create fields for user input. You can also use it for reusable content when put into a variable set, such as terms and conditions.

It is available in two modes: edit and read-only. In edit mode, a toolbar is available, and links do not work. In read-only mode, no toolbar is available, and links work. To switch between modes, use entitlements or create a UI policy to set the HTML field to read-only mode.

Note: HTML variables are not supported for display on the shopping cart summary or approval summary screens.
Figure 8. Example of an HTML variable
Example of an HTML variable

IP Address

This variable allows you to specify the IPv4 and IPv6 data for a catalog item. Under the Validation Scripts submodule, a validation script type associated with this variable is available.

Note: When you set the default value for the IP Address variable, or specify its value in the g_form.getValue() and g_form.setValue() functions, the delimiter is (.).
Figure 9. Example of an IP address variable
Screenshot for the IP Address variable

Label

The label variable displays a label across the form. Labels are formatting elements. No data is collected.

You can use labels to arrange questions into sections. You can also use them for questions with multiple options. For example, label check boxes for the different options for a question.

Figure 10. Example of a label variable
Example of a label variable

List collector

The list collector variable creates a slushbucket interface that lets users select and add multiple records from a table. For attributes supported by this variable, refer variable attributes.

Figure 11. Example of a list collector variable
Example of a list collector variable

For more information on using the list collector variable, see this video:

Note: Reference Qualifier and glide_list attribute applies to releases from Helsinki onward only. It does not apply to Geneva.

Lookup multiple choice

The lookup multiple choice variable creates radio buttons using data from a table. Its functionality is similar to the lookup select box variable, which creates a choice list from queried data. For attributes supported by this variable, refer variable attributes.

Figure 12. Example of a lookup multiple choice variable
Example of a lookup multiple choice variable

Lookup select box

The lookup select box variable creates a choice list using data queried from a table. Its functionality is similar to the lookup multiple choice variable, which creates radio buttons from queried data. For attributes supported by this variable, refer variable attributes.

To create the lookup select box shown in the following figure, enter the following values when creating the variable:
  • 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
Figure 13. Example of a lookup select box variable
Example of a lookup select box variable

Macro

The macro variable inserts a UI macro into the catalog item.

UI macros in the service catalog do not support the following glide_list functions: clickthrough, slushbucket editing, and email field.

  • Use phase one Jelly only for any UI macros added as variables. Phase two Jelly within the macro is not processed and appears on the page as standard content.
  • This variable is not yet supported on mobile devices.
  • This variable is supported in Service Portal through widgets. Create a widget with the same functionality as that of a macro and link it with the variable.
Figure 14. Example of a macro variable
Example of a macro variable

Macro with label

The macro with label variable inserts a UI macro with a label.

  • This variable is not yet supported on mobile devices.
  • This variable is supported in Service Portal through widgets. Create a widget with the same functionality as that of a macro with label, and link it with the variable.
Figure 15. Example of a macro with label variable
Example of a macro with label variable

Masked

The masked variable inserts a field that masks text entered by users. Each character entered by users is displayed as an asterisk (*). Use this variable to ask users for sensitive or confidential data such as passwords.

Since a masked variable uses platform encryption using TripleDES, the values for this variable are also encrypted. These values can be decrypted by using current.variables.getDecryptedValue() on RITM, Catalog Task, or any task extension record created using a record producer.

Figure 16. Example of a masked variable
Example of a masked variable

Multi-line text

The multi-line text variable creates a field that lets users enter multiple lines of text.

Figure 17. Example of a multi-line text variable
Example of a multi-line text variable

Multiple choice

The multiple choice variable creates radio buttons for question choices.

Figure 18. Example of a multiple choice variable
Example of a multiple choice variable

Numeric scale

The numeric scale variable creates a set of radio buttons for a range of options, like a Likert scale.

Figure 19. Example of a numeric scale variable
Example of a numeric scale variable

Reference

A reference variable references a record in another table. For example, a variable named point_of_contact references the User [sys_user] table. For attributes supported by this variable, refer variable attributes.

Keep the following information in mind when you create a reference variable:
  • Reference variables use the auto-complete feature. To ensure that users have enough information, configure the reference lookup list.
  • 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()
current.variable_pool.<variable name>.getDisplayValue()
Figure 20. Example of a reference variable
Example of a reference variable

Select box

The select box variable creates a choice list from pre-defined question choices. For attributes supported by this variable, refer variable attributes.

Figure 21. Example of a select box variable
Example of a select box variable

Single-line text

The single-line text variable creates a field that lets users enter a single line of text. For attributes supported by this variable, refer variable attributes.

Figure 22. Example of a single-line text variable
Example of a single-line text variable

UI page

The UI page variable inserts a UI page into the catalog item.

  • Use phase one Jelly only for any UI macros added as variables. Phase two Jelly within the macro is not processed and appears on the page as standard content.
  • This variable is not yet supported on mobile devices and Service Portal.

URL

The URL variable creates a widget for users to enter URLs. URLs are validated for the following protocols: HTTP, HTTPS, FTP.

Figure 23. Example of a URL variable
Example of a URL variable

Wide single-line text

The wide single-line text variable creates a field that spans the form, letting users enter longer lines of text. For attributes supported by this variable, refer variable attributes.

Figure 24. Example of a wide single-line text variable
Example of a wide single-line text variable

Yes/No

The yes/no variable creates a choice list with Yes and No as options.

Figure 25. Example of a Yes/No variable
Example of a Yes/No variable