Contextual variables for config data

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 1 minute to read
  • Contextual variables are out-of-the-box variables delivered by ServiceNow that enable you to use the context of a node to define a variable.

    Important:
    Starting with the Washington DC release, DevOps Config is being prepared for future deprecation. It will be hidden and no longer installed on new instances but will continue to be supported. For details, see the Deprecation Process [KB0867184] article in the Now Support Knowledge Base.
    For example: CollectionA has defined these variables:
    • "environment": "(#DEPLOYABLE.ENVIRONMENT_TYPE#)"
    • "deployable": "(#DEPLOYABLE.NAME#)"

    When you add the collection to a deployable, these variables are set to the values defined in the context, which would be the environment type and name of the deployable for CollectionA.

    The available out-of-the-box contextual variables are:
    Table 1. Contextual Variables
    Variable Description
    NAME Name of the node.
    APPLICATION.NAME Name of the application.
    DEPLOYABLE.NAME Name of the deployable.
    DEPLOYABLE.ENVIRONMENT_TYPE Environment type of the deployable.
    COLLECTION.NAME Name of the collection.
    FULL_PATH The full file path of the collection.
    RELATIVE_PATH The file path of the collection, relative to the deployable.
    RELATIVE_PARENT_PATH The file path of the parent to the node.