Metadata (Global Variables)
  • 30 Aug 2022
  • 1 Minute to read
  • Dark
    Light

Metadata (Global Variables)

  • Dark
    Light

Article summary

The Icon  Description automatically generated Metadata button opens a pane containing global variables accessible to any Trigger, App, Operator, or Component within a Playbook (Figure 1). Global variables are ad-hoc user-defined variables that are created at the Playbook level. These variables can be set, updated, and referenced anywhere in the Playbook, even inside nested Components and Iterators. They provide an easy way to track settings, counts, and other important information throughout a Playbook’s execution.

Note
ThreatConnect provides a set of global variables that apply across all Playbooks in an Organization. User-generated global variables in the Metadata pane apply only to the Playbook in which they are defined.

 

To create a global variable, open the Metadata pane and then click Create Global Variable. The Metadata configuration pane will be displayed (Figure 2).

 

  • Name: Enter a name for the global variable. The name may not contain any spaces.
  • Read Only: Select this checkbox to prevent the variable from being edited.
  • Type: Select a variable type from the dropdown menu. Available types are String, StringArray, and Binary.
  • Value * (<type>): Enter a value for the global variable in the text field.
    Important
    The only accepted input format for the StringArray type is a JSON StringArray.
  • Upload: Toggle the Upload switch on to upload a file to define the global variable.

The Interactive Mode setting of the Playbook Designer has a Variable Explorer that shows the values of all ThreatConnect and user-defined global variables. See Variable Explorer for more information.

Update Global Variable App

If a user-generated global variable was not set as Read Only during configuration, the variable can be updated within a Playbook by using the Update Global Variable App. This App allows you to define another value that should replace the initial value of the global variable.

To add the App to a Playbook, navigate to the Apps pane in the side navigation bar and search for the App, which is in the Utility category (Figure 3).

 

Click the App in the list to add it to the design pane. Then double-click on the App in the design pane to open the Edit App configuration pane (Figure 4).

 

  • Job Name: Enter a descriptive name for the App.
  • Variable:
    • Operation: Select the type of operation to change the variable’s value: Set, Increment, Decrement, Push, Pop, or Clear.
    • Variable: Enter the name of the variable to be updated by using the formula #gbl.<name of Global Variable> (#gbl.test.string in this example).
    • Value: Enter the new value for the Global Variable (vdinkley in this example).
  • Click the SAVE button.

ThreatConnect® is a registered trademark of ThreatConnect, Inc.

20110-16 v.02.B


Was this article helpful?

What's Next