Table of Contents
Setting Page Variables is a powerful way to interact with data. The “Set Page Variable” Action allows values from a specific record in one data visualization to set the context for an entire page of Visualizations. Page Variables are how the lower level concept of Node Variables get exposed to end users.
- Node Variables are what get used in the underlying queries that pull data into the system.
- Page Variables are mapped to underlying Node Variables. The concept of a Page Variable allows a single input to drive multiple Node Variables.
By updating a Page Variable, the values used in associated Node Variables will change. Altering Node Variables will modify how underlying data gets filtered and ultimately what is presented in the Visualizations on a page.
Configuring a “Set Page Variable” Action #
The configuration for this Action is done in two steps.
- The first step is a mapping exercise. It maps data attributes to Page Variables.
- The second step sets up conditions for when the Action fires. This allows you to ignore firing an event if the value is NULL.
Step 1: Base Config #
|Action Name||Give this Action a name that will be used on a context menu if more than one Action is configured for the event.|
|Description||Optional description of the action for maintenance and documentation purposes.|
|Default Selection||Yes/No When Yes, upon Visualization initialization, if the Page Variable has an unset or invalid value, choose the first item in the Visualization as the default value.|
|[List of Page Variables]||The list of Page Variables will grow based on the data visualizations used on the page.|
This step defines what Page Variables will be updated. Suppose you are setting up a “click” Action. On this step, you need to map the attributes in the underlying dataset that will update the available Page Variables. This will happen whenever a user clicks on something in this Visualization.
Example: Assume the two Page Variables shown below:
Both Page Variables will show up as options in the base “Set Page Variable” configuration.
You can set Page Variables a couple different ways. You can use either of the following:
|Record Value||This option uses values from the record that was clicked to fire the Action.|
|Page Variable||This option uses values from the current Page Variables.|
Using Record Values to set Page Variables #
If you are leveraging values in the underlying data set, you just need to wire up the names of data attributes to the available Page Variables. In the example below, suppose we want to update two Page Variables with a single click.
The example above shows the following:
- The value from the data attribute named “Service” will be used for the Page Variable “Service_ID”.
- The value from the data attribute named “Severity” will be used for the Page Variable “Severity”.
When clicking on a visualization, the user is actually interacting with a record the underlying data set. In this scenario, once a record is clicked, both Page Variables will change based on the values for the specified attributes in that record. By doing so, the values being used in the underlying queries referencing this Page Variable will also change, and this will ultimately change what is being presented in the associated Visualizations on the page.
Using Page Variables to set Page Variables #
Sometimes the necessary context is not in the dataset that the user has clicked on; it is at the page level. In this case you need to pass the value of a Page Variable to another Page Variable. This concept is more common when switching to another page, and you want to capture a value from a Page Variable on the current page, and apply it to the target Page. However, it can also be used when setting a Page Variable on the current page. To Set a Page Variable with another Page Variable, change from the default “Record Value” option to the “Page Variable” option.
This changes the scope of the associated pull-down. The pull-down to the right will now contain a list of the Page Variables on the current page, instead of a list of attributes from the dataset that the user clicked. Use this pull-down to select the Page Variable that has the desired value.
Step 2: Conditions #
This step lets you specify additional conditions for when this Action would be fired. For example, assume a user is working with some event data, and only wants to fire the “Set Page Variable” Action for events that have a Severity_Name = “Critical”. You can add that logic here in the conditions step, as shown in the example below: