Query Viewer Variables
To add a local variable:
-
On the Local Variables tab, click Add.
-
Provide a name for the local variable.
Note: Ensure that the name is unique across resources. Local variables cannot share names. -
Choose a function from the Function drop-down list.
For a description of available functions, see Variables.
-
Provide other details as needed and click OK.
The local variable is available in the following views:
-
As a field on the Fields tab in the query viewer editor definition (including the options to Use and use as a Key field).
-
As a column in the query viewer result. If the query viewer result is displayed in the viewer when you add the variable, the variable shows up immediately as a column in the result.
For example, you can add a local variable using the Timestamp Function (such as GetHour, GetDayOfWeek, GetDayOfMonth, and so forth).
Note: You cannot promote a query viewer local variable to a global variable. Query viewers operate on queries, which have their own distinct schema for each instance. A local variable defined for a query viewer is only applicable to that query viewer.
Local variables defined for data from events, actors, cases, and assets can be promoted to a global variable.
For more information about global variables (which can be used in queries), see Global Variables.