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.
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.
The configuration for this Action is done in two steps.
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:
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:
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.
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.
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: