Blog Post

Community Blog
3 MIN READ

BiViewer Parameters Demystified - pt 1

Noemi's avatar
Noemi
New Contributor III
10 months ago

We know that OneStream users love BiViewer components. They look nice, are dynamic and interactive, and bring tons of baked-in functionality - ready to be leveraged with minimal effort and no coding. However, dashboard designers sooner or later find themselves in situations where BiViewer doesn't seem to fit in the more traditional setups of OneStream Dashboards; typically, there will be a few Parameters being passed around, and how do we feed those to BiViewer? And how can we get data actually out of it?

Until recently this was a bit of a black art, but it's now wonderfully documented in the online help. We will cover a simple real-life example over two posts.

Passing Parameters to BiViewer

Let's say we have some data getting into BiViewer, with a Data Adapter. We wire the adapter to a Grid, and everything is fine.

However, the Dashboard that will contain this BiViewer will actually have a drop-down, allowing users to select the Origin member they want to see data for, e.g. Import, Forms, or Top. We could replicate the filter in BiViewer, but that would be redundant; instead, we want BiViewer to react to our bog-standard Parameter, in this case called "MyParamOrigin".

There are two parts to the problem: creating an internal BiViewer parameter, which can use to filter a widget; and then wiring it to the external Dashboard Parameter

Setting up BiViewer Parameters

The first issue requires a bit of setup. We must click on the Parameters button, found in the top-right corner of the Home ribbon in the BiViewer Designer:

This will give us a pop-up where we can manage our BiViewer parameters. Clicking on Add in the lower-left corner, we can set up our parameter. Here we'll specify that the possible values for the parameters will dynamically come from String (text) items found in a column (in this case "Origin") coming from our Data Adapter source (in this case "Prod by Entity"). We also provide a default value ("Import").

Click OK and we're done. We have a parameter, now we can reference it in our widget! First we'll add the column to our hidden dimensions on the widget:

Then we edit the Filter for the Amount column:

And in our filter, we reference our parameter by preceding its name with a question mark (?); you can just type it in the lower area, autocomplete will help you. Note the lack of quotes around it.

Boom, our widget is now filtered! However, we now need to solve the second part: wiring the BiViewer parameter to our Dashboards one.

Populating BiViewer Parameters With Dashboard Parameters

The wiring part is actually trivial: we will just populate Parameter Name Value Pairs in the Component Properties of BiViewer. We must provide a comma-separated list of pairs "SomeName=SomeValue"; when BiViewer runs, it will try to match parameters by name, and when a match happens, the internal parameter will be set to the provided value. In this case, we specify our "MyBVOrigin" parameter to receive the value of our Dashboard Parameter:

Note the squared brackets around our Parameter: those are optional, but they will save your skin when its value includes spaces or commas - you've been warned...

That's it! Save your component, and next time you switch to the BiViewer Designer, you will be prompted to enter a value for the Parameter (i.e. MyParamOrigin).

Unfortunately that pop-up is a bit dumb, ignoring any configuration you might have in the actual Parameter; just enter a value manually for testing purposes. Note: this popup will go away when you actually place the BiViewer component in a Dashboard where the Parameter is bound to some other component (ComboBox etc); the relevant value will be passed automatically behind the scenes!

Now the MyBVOrigin parameter will contain "Forms", so the data will be filtered accordingly:

You've seen how to bring Dashboard Parameters to BiViewer, but can we move data the other way too? Of course! Stay tuned for part 2...

Updated 9 months ago
Version 3.0
  • Noemi's avatar
    Noemi
    New Contributor III

    Hi Thor,

    You need to follow the step as explained in this blog. What is not described in detail is that the parameter "MyParamOrigin" is linked to a combo box component (e.g. cbx_Origin), and that combo box component will then refresh the dashboard containing your BI Viewer component.

    I hope it helps. 

    Have a nice day, Noemi

  • ThorJensen's avatar
    ThorJensen
    New Contributor II

    Dear Noemi. Thank you so much for this runthrough. You mention that the parameter can be bound to a BIViewer component like a combo box. Could I perhaps ask you to show how thats done? Thanks! 

    Best Thor