Service Catalog variable editors
Summarize
Summary of Service Catalog variable editors
Service Catalog variable editors in ServiceNow enable viewing and managing variable values specified by requesters in catalog items and record producers. These editors display the variable data in fulfiller forms, helping fulfillers review and act on requests accurately.
Show less
Key Features
- VEditor: Used exclusively for catalog items, this editor displays variable values on Requested Item (RITM) and catalog task forms. It supports catalog UI policies and client scripts specifically for these tables. Values come from the internal Options [scitemoption] table, which should not have business rules added.
- Default variable editor: Designed for record producers generating records for task-extended tables (e.g., Incident, Change). It displays question values from the Question Answer [questionanswer] table, also internal and protected from business rules. Supports catalog UI policies, client scripts, data lookups, and reference qualifiers for task-extended tables.
- Agent Workspace integration: The variable editor auto-includes in the Variables section if the formatter is available. Certain variable types like Macro, UI Pages are excluded; others like Multiple Choice and Lookup display as select boxes.
- Service Portal support: Variable editor is available for requester forms with the formatter, but usage is recommended primarily in Agent Workspace for fulfillers.
- Read-only configurations:
- In core UI and Agent Workspace, the GlideForm
setVariablesReadOnly()method sets variables to read-only on requested items, target records, and catalog tasks. - In Service Portal, read-only mode can be enabled via a portal configuration ("readonlyvariableeditor": "true"). Note that some variables (UI Page, Macro) still render as editable.
- In core UI and Agent Workspace, the GlideForm
- Important considerations: The variable editor depends on the inactive Variables column in the Task [task] table, which should not be activated.
Practical Use and Configuration
- Use the VEditor for catalog item requests to display and manage requester-supplied variables on RITM and catalog task forms.
- Use the default variable editor for records created by record producers on task-extended tables to view and edit variables as part of fulfillment.
- Enable catalog UI policies and client scripts appropriately by selecting checkboxes that target Requested Items, Catalog Tasks, or Target Records depending on the editor.
- In Agent Workspace, ensure the variable editor formatter is included in the Workspace view to show variables to agents effectively.
- For Service Portal end-user forms, configure the variable editor with caution and prefer Agent Workspace for fulfillment scenarios.
- Make variable editors read-only where necessary using supported methods or portal configurations to protect data integrity during fulfillment.
Variable editor displays variable values in fulfiller forms. A requester, while requesting the item, specifies these variable values in the catalog item questions.
Types of variable editors based on the catalog item type:
- For a catalog item, the VEditor (com.glideapp.servicecatalog.VEditor) displays the values of questions in the requested item and catalog task forms.
- For a record producer, the default variable editor (com.glideapp.questionset.DefaultQuestionEditor) displays the values of questions for records generated from a record producer for task-extended tables.
VEditor
The VEditor is applicable only for the requests created from catalog items.
In ServiceNow AI Platform, this editor is a formatter added on the requested item (RITM) form (Default View) and the catalog task form (Default View).
The VEditor is applicable only for RITMs and catalog tasks. It cannot be used for any other tables. To support catalog UI policies or catalog client scripts on the VEditor for the RITM and catalog task form, select the Applies on Requested Items and Applies on Catalog Tasks check boxes for the catalog UI policy or the catalog client script.
- Requested Item [sc_req_item]
- Catalog Task [sc_task]
Default variable editor
The default variable editor is applicable only for record producers. This editor is a formatter added on records that are generated by a record producer for task-extended tables. This editor displays the values of questions specified in the record producer.
By default, this editor is applicable for the Incident and Change tables. For other tables, you can configure this editor.
Variable editor in Agent Workspace
- If the variable editor formatter is available in the Workspace view of the form, the variable editor is automatically added to the Variables section in the Agent Workspace UI.
- If the variable editor formatter is added inside a section in the Workspace view of the form, that section does not display the variable editor in the Agent Workspace UI.
- Macro
- Macro With Label
- UI Pages
- Multiple Choice
- Numeric Scale
- Lookup Multiple Choice
Variable editor in Service Portal
In the Service Portal UI, the variable editor is available for forms with the variable editor formatter.
Making a variable editor read-only
The following options are available to make a variable editor read only, depending on application.
- Service Catalog variable editors in the core UI
- The GlideForm setVariablesReadOnly() method is supported for ServiceNow AI Platform and Agent Workspace forms to make the variable editor read-only. This method is intended for requested item, target record, and catalog tasks.Note:This method is not applicable in Service Portal and is not recommended for catalog forms.
- Service Portal variable editors
- To make the VEditor read-only in Service Portal, navigate to , select Service Portal, and specify the following code in the Quick start config field.
"readonly_variable_editor": "true"Note:The UI Page, Macro, and Macro with Label variables are rendered even when the variable editor is read-only.