Blog Post

Community Blog
2 MIN READ

BiViewer Parameters Demystified - pt 2

JackLacava's avatar
JackLacava
Honored Contributor
10 months ago

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:

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

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:

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:

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:

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.

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:

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!

Updated 10 months ago
Version 2.0
  • MCorrado's avatar
    MCorrado
    New Contributor

    Thank you for this as it is extremely helpful. Question though, is there any kind of functionality to grab multiple dimension from the same Bi-Viewer component? (ex. By clicking on a pie chart I am trying to grab multiple dimension through the Action Name Value Pairs property and pass them as a string into my bound parameter.) Any insight into this would be extremely helpful! Thank you!

  • JackLacava's avatar
    JackLacava
    Honored Contributor

    You could create a Calculated Field that contains all the dimensions, making sure it's available in the widget somehow, then reference that (e.g. Sales=MyCalculatedField).

  • ssmith-nova's avatar
    ssmith-nova
    New Contributor III

    I have a filter element named "Select Period:".  Am I able to pass the selected value from the dropdown to a parameter?  I tried with the method you explained, but it didn't work.

    Thanks,

    Scott