Create or update a variable CDI

task australia Updated Sep 10, 2026 2 min read cdm-variables-crud.md
Raw file servicenow.com

Define variables and set their values in components, collections, and deployables.

Before you begin

Important: DevOps Config is now deprecated and no longer supported or available for new activation.

Role required: cdm_editor or cdm_admin

About this task

Important: Save your changes whenever you are confident of the changes and before you leave the Config data tab.

  • When you create an application, the system auto-generates an empty vars folder in each of the three top-level folders: component, collection, and deployable.
  • When you add a collection or deployable, the system adds an empty vars folder to the item that you created.
  • A vars folder can contain only variable CDIs or folders. Any subfolder can contain only variables or folders.
  • The value of a variable in a collection overrides the value of the variable in a component.
  • The value of a variable in a deployable overrides the value of the variable in a collection or component.

Procedure

  1. Use either of the following methods to edit or add an instance of a variable while working in a changeset:

    • Edit directly in the editing panel. Use the following format to set the value of a variable:

      Text
      "<variableName>": "<value>"

      In this example, the dbName variable and several others reside in the database folder. In addition, the backup folder (a child of the database folder) holds the dbServer variable.

      [Omitted image "cdm-var-folder-example.png"] Alt text: A var folder and its contents

    • Create the variable in a dialog box. Follow the procedure in the next step.

  2. Select the more actions menu icon ([Omitted image "icon-actions-menu.png"] Alt text: More actions icon.) for the appropriate vars folder, select Create variable, and then specify its settings.

 

 

Name

Unique and meaningful name for the variable.

Value

Value that the variable has in the current context.

Tip: It is often useful to define a default value for a variable in a component or collection. This is a powerful strategy because you can create a broad variety of deployables from a small set of components and collections. Deployables that inherit a component or collection can use overrides, overlays, and variable settings to meet the needs of the environment type. For example, the Development deployable can use the same components and collections as the Test deployable. Development uses the default database variable value. Test, in contrast, uses a different value that is appropriate for the test environment.

Encrypted

Option to specify that the value of the variable should be encrypted. The option appears only for users with the CDM Secrets [sn_cdm.cdm_secrets] role.

After you create the variable, the value appears in all views as *******. To view the value on any tab that displays the variable, users with the CDM Secrets [sn_cdm.cdm_secrets] role can select the View encrypted data menu option.

Search documentation
Search document titles and file paths on the australia branch