The following events can be used in a DashboardViewer control:
This event is triggered every time the value of a filter is changed.
The Filters can be as follows:
The event data can be queried in the variable &FiltersChangedData that is created and associated with the FiltersChangedData property in the "Event parameters" category when inserting a DashboardViewer control in a Web Panel.
In some cases, a user's action changes more than one filter at the same time:
In queries with On item click property: ApplyFilters, where the clicked item is used as a dashboard filter, a second click on the item disables the filter.
For this case, the reported filter that changed in the FiltersChanged event has a property called Enabled to indicate if it is active or not (this doesn't apply to filter-type controls that are always enabled).
It is triggered every time a value is clicked on a Query object (graph, table, pivot or card).
When a DashboardViewer control is inserted in a Web Panel, the variable &ItemClickData is automatically created and associated with the ItemClickData property of this control. The item information is loaded in this variable when the event is executed.
The loaded data includes:
- The name of the Query you clicked on.
- The Query Element and its value.
- Also, information is provided about the values of the other Query Elements associated with the clicked value (through the Context property).
It is triggered in the Query object with On item click property: HighlightValues every time a value is marked or unmarked.
When a DashboardViewer control is inserted in a Web Panel, the variable &ValuesHighlightedData is automatically created and associated with the ValuesHighlightedData property of this control. The information is loaded in this variable when the event is executed.
The information returned is a Name-Value collection for each of the dimensions of the clicked query.
The variables &ItemClickData, &FiltersChangedData, and &ValuesHighlightedData also contain information about the value of the other Dashboard filters at the time the event is executed, which can be queried from the AllFilters collection.
If the Web Panel was created using GeneXus 16 upgrade 3 or lower, and already had the DashboardViewer control, the properties ItemClickData, FiltersChangedData and ValuesHighlightedData will be empty.
Therefore, when the event is triggered, it will not be able to query its parameters.
In this case, you have to manually create the variables (&ItemClickData, &FiltersChangedData and &ValuesHighlightedData) and associate them with the corresponding property.
The reason is that these variables are created and associated with the corresponding properties in the DashboardViewer control when it is inserted in a Web Panel.
TestWebQueryViewer
Dashboard object
DashboardViewer control
Query object