Variables
Summarize
Summary of Variables
The Variables page in ServiceNow provides a comprehensive list of available variable sets that can be used primarily for Auto Query scans. Variables can be associated with specific Sites, enabling tailored query configurations. The interface includes a search function, options to create new variable sets, and indicators that clarify variable usability and security status.
Show less
Key Features
- Variable Set Display: Shows variable sets with columns indicating name, description, associated sites, and number of variables.
- Icons and Indicators:
- A green bracket-dot icon indicates the variable is eligible for Auto Query use; white means it is not.
- A green lock icon signifies the variable’s password is encrypted for security.
- Site Association: Each Site can be linked to only one variable set, but a variable set can contain multiple variables.
- Special Variable Sets:
- Custom - Global: Editable by users and can override Driver - Global variables.
- Driver - Global: Read-only and serves as the default variable set if no overrides are defined.
- Variable Set Management: Users can edit or delete variable sets using the pencil and trash can icons respectively.
- Import/Export Capabilities: Variable sets can be imported or exported in JSON or CSV formats. When exporting, users decide whether to include encrypted password variables as plain text, which affects their security.
Query Behavior
During a query, the system checks which Sites are targeted and looks for any associated Site-specific variable set overrides. If none exist, it checks for a Custom - Global override. If still none are found, the query defaults to the Driver - Global variable set. This hierarchical override system allows flexible and precise variable management tailored to different Sites and use cases.
The Variables page provides a list of currently available variable sets.
Variable overview
The Variables page displays the available Variable sets on your system. It provides a Search Variables field above the variable list.
You can also create new variable sets. Variables are used for Auto Query scans and can be associated to a specific Site.
The columns on the page are:- The bracket dot icon
and lock icon
appear in the row next to the variable listing. When the bracket-dot symbol appears green next to the variable's name, the variable can be used for auto queries. When white, the variable can't be used for auto queries. The green lock indicates that the variable password is encrypted.
Note:Encrypted Variable values in Variable Sets are obscured. - Name
- Description
- Sites display the name of the site to which the variable is associated.Note:A Site can only be associated with a single Variable set, but a Variable set can contain many variables.
- Variables (number of variables)
- Tools
- Select the pencil icon
to edit the variable set.
- Select the trash can icon
to delete the variable set.
- Select the pencil icon
Special Variable sets
- Custom - Global
- Driver - Global
You can use variable sets (Custom - Global or Site-specific sets) to override a Variable set. See Edit a Variable set or Create a Site-specific Variable set to use with Auto Query for more information on editing a Variable set.
Query Behavior
During a query, the query configuration is reviewed to see which Sites are being targeted. The query then searches to see if any Site-specific variable set override is defined. If no override is defined, it then searches to see if any Custom - Global override is defined. If it doesn't find a custom override, the query uses the default variable set from the Driver - Global.