Variables

Variables are used by module builders to configure how data moves through a Workshop module. A list of available variable types can be found below.

To access existing variables in a Workshop module or define new variables, open the Variables menu found in the left sidebar.

Variables sidebar panel in Workshop editor

The Variables panel (shown above) displays a list with the current variables that exist within a module, a plus + button to add a new variable, an input to search variables by their name, a button to open the variable dependency graph, and a filter to display variables based on their definition type or what settings are enabled.

Selecting a variable from the list on the left allows you to view and modify the configuration of that variable in a window that opens to the right of the variables list. The following configuration options are available:

  • Variable name: Selecting the variable name or the pencil icon will allow you to edit the name of the variable. We recommend using descriptive variable names to help document the configuration of your Workshop module and make it easier to find a desired variable later in the configuration process.
  • Variable definition type: Next to the variable name is a dropdown menu that provides options for how a given variable is defined and populated with data. Available choices will vary based on the selected variable type and can include options such as the following:
    • Static: For manually set variable values
    • Function: For function-backed, dynamically computed variables
    • Object set aggregation: For variables derived from an aggregation of an object set
    • Object property: For variables tied to a selected property value of single object
    • Object set definition: Specifically for object set variables defined by selected object types, filters, and linked objects traversals
    • Variable transformation: For defining a variable value as a series of common operations, possibly referencing other variables; review the variable transformations documentation for more information.
  • Delete variable (trash icon): Variables that are unused in a module (by widgets or downstream variables) can be deleted.
  • Variable definition configuration: The main part of the screen where the specifics of a variable are configured. The options provided here will change based on the selected variable type and variable definition type and will feature on-screen instructions.
  • Variable settings: The variable settings panel allows configuration of an external ID and which of the below features should be enabled for a given variable.

The screenshot below shows an example configuration for an Object Set variable:

Editing an Object Set variable

The screenshot below shows an example configuration for a string array variable:

Editing a string array variable

Variable types

Workshop supports the following variable types:

  • Array: Accepts an array of Boolean, date, numeric, string, or timestamp values.
  • Boolean: Accepts values of true or false. Initialized from either a static value or the output of a function, aggregation, or object property.
  • Date: Accepts a date. Initialized from either a static value or the output of a function, aggregation, or object property.
  • Numeric: Accepts a numerical value, including both integers and floats. Initialized from either a static value or the output of a function, aggregation, or object property.
  • Object set: Stores a set of one or more objects. Initialized from either an entire object type or another object set variable and then may be optionally filtered by property values or Filter variables or optionally pivoted to linked objects via a Search Around. You can also pivot to other object types across ontologies through shared property types.
  • Object set filter: Stores a set of property type / property value pairs used to filter object set variables. Initialized from an object type and then a set of property type / property value filter pairs.
  • String: Accepts text. Initialized from either a static value or the output of a function, aggregation, or object property.
  • Struct: Stores a composite type that maps string fieldIDs to values. Currently, nested structs are not supported but any other Workshop variable type for a struct field's value is accepted. Initialized from the output of a function. See Struct variables for more information.
  • Timestamp: Accepts a timestamp. Initialized from either a static value or the output of a function, aggregation, or object property.
  • Time series set: Stores a time series property of a single object, optionally allowing the application of time series transforms to it. See Time series properties in Workshop for more information.

Variable dependency graph

The header of the Variables panel, contains a button with a graph node icon. This button opens the Variable dependency graph. This dependency graph offers a way to debug your variables, showing the dependency graph of variables and widgets within the module. Selecting a variable node in the graph will reveal information about the following:

  • The current value
  • How the variable is used
  • The variable value configuration

Notably, next to the variable value configuration is an option to clear value which will reset the variable definition to the empty state.

Widgets are shown as nodes in the graph but offer no additional information when selected.

A Screenshot of the Workshop variable dependency graph