Skip to content

View States

View States store values accessible to all components of the dashboard. Use them to pass values like user selections or preferences between components and into queries.

View States can be edited from the View State dialog.

Screenshot
Select View State dialog showing a selected View State and its properties

This dialog can be summoned by clicking inside any input box showing the eye icon Screenshot.

Hidden eyes

Some inputs offer View States, but the icon is hidden. For some it’s to the left of the Screenshot Clear button. If a View State is available, a rollover of the input will display the eye icon.

Screenshot

With a View State paired to a Text Input or Drop Down component, a user’s input can be passed to any dashboard component.

User input

To prevent errors, it may be necessary to include a text prompt to help the user put information in the correct form.

Creating a View State

  1. In the Select View State dialog, click New to create a new View State. Name it.

    Screenshot

  2. Set the Type:

    boolean, byte, char, date, datetime, dict, double, float, guid, int, list, long, minute, month, second, short, string, symbol, time, timespan, timestamp

  3. Set a Default value if required. (This will immediately map to Value.) When a dashboard is loaded it will automatically run queries using the default value.

  4. Click Select Item.

    Screenshot

In the Query Editor

As new data sources are defined in the Query Editor, it is often convenient to map them immediately to View States.

This can be done with a single click on the eye-and-gear button.

Screenshot
Mapping a query’s trade argument to an eponymous View State

This will update Value to reflect the mapped View State. For example, <%Query/value%> as mapped in the image below:

Screenshot

To edit the View State, click on the eye button to summon the Select View State dialog.

Screenshot

Parameter types

Parameter types must match. A parameter’s type is defined in the Select View State dialog. Check to ensure the same type is assigned in the Query Editor for which the View State is assigned.

In Query Editor, if there is an assigned value prior to creating a View State, the created View State will adopt the assigned value as the default value; ensuring the query will run when executed.

Selected values

Selected Values are available in chart components. Values are captured using:

Selected Value
A View State – ‘publishing’ the selection for other components
Selected Value Attribute
A column from the component’s Data Source

Data types

When mapping Selected Values to Selected Value Attribute, ensure the data type of the View State matches the data type of the Data Source column; e.g. integer for numbered data.

View State Routing

Used by Data Grid and Charts. When a user selects a data row, line point, bubble or bar represented value(s) can be assigned to viewstate parameters.

Selected Item Viewstate Routing

Screenshot

Column
Column name from the data source
Viewstate
A viewstate parameter created within the dashboard.
Selected values
2 click
If enabled the assigned data source routing will require a double click.

Sharing View States across dashboards

When sharing View States between different dashboards, matching View States (case sensitive) must be created on the host and destination dashboard.

This is relevant when creating Buttons to switch between dashboards, and when using the Navigation component.

Linking components

Components can be linked so that changes in one component are reflected in another.

For example, drilling down on the Pivot Grid below results in changes to the linked Breadcrumbs and Canvas Chart.

Screenshot
Linked components

On drilldown, becomes

Screenshot
Drill-down on data grid also updates breadcrumbs and canvas bar chart

Link components by creating a View State and setting it as the Focus property of the linked components.

Screenshot