JackLacava
Community Manager
Community Manager

In Part 1 of this short miniseries , we have seen how we can pass values from traditional Dashboard Parameters into Bi Viewer. But what about going the other way around, i.e. getting values from Bi Viewer into Parameters?

In practice this is even easier, requiring very little configuration: we indicate which value should be taken from which widget in our Bi Viewer instance, and the value will flow into the Bound Parameter we name. However, it has a limitation: we can only bind one Parameter to any given Dashboard Component, and Bi Viewer is no exception. We can pull that value from multiple different widgets, but it will only ever go to one Parameter.

First, let's say we have a simple grid called "Sales", that looks like this:

JackLacava_0-1709309960732.png

In order to enable selection, we will turn it into a filter:

JackLacava_8-1709311951184.png

When the user selects a row, we want the Account on the selected row to be passed to a Dashboard Parameter called SelectedAccount. So we go back to the Component Properties tab, and we enter the following:

JackLacava_4-1709310976375.png

The syntax is a bit unusual but straightforward: the first element is the name of the widget we will take the data from (Sales); the second name is the field of that widget that will provide the specific item (in this case, the name of a column, Account).

Last but not least, we bind our Parameter, like we would do with any Dashboard Component:

JackLacava_5-1709311022179.png

VERY IMPORTANT NOTE: unlike regular Bound Parameter, this one must not already exist! It will be automatically created at runtime, behind the scenes. It's the same as Navigation Links in Cube Views!

We can then reference this Parameter elsewhere as normal. In this case, I'm adding it to a Label text:

JackLacava_3-1709310904799.png

Et voilà! Now, when the user selects a row from the widget, the Parameter will contain the value of the Account field for that row.

JackLacava_2-1709310806059.png

Note that you will still have to deal with the usual requirements for Parameters, i.e. you need to refresh dashboards containing components that will receive the new value. You can even put the Refresh right on the "Selection Changed User Interface Action" property of the Bi Viewer component itself.

This works for pretty much all regular widgets, like Charts and Pivot Grids! And you can even wire multiple widgets from the same component, just adding more clauses to the property - the last-selected item will just overwrite the previous one. For example, here I've also wired a chart called SalesChart, so that when I select a column, the Bound Parameter will contain that time period:

JackLacava_6-1709311836641.png

JackLacava_7-1709311864182.png

That's pretty awesome!

Now that you know how to use Bi Viewer as a selector tool to drive other Dashboard elements, the sky is the limit! For example, you could have a Choropleth Map that will drive a Cube View, allowing people to select regions from the map and see data in a CV for them. Feel free to share your best creations in comments!