Noemi
New Contributor III

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.

Noemi_1-1708517772599.png

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".

Noemi_2-1708518313972.png

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:

Noemi_4-1708519603165.png

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").

Noemi_5-1708519700407.png

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:

Noemi_6-1708520090735.png

Then we edit the Filter for the Amount column:

Noemi_7-1708520153656.png

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.

Noemi_8-1708520293190.png

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:

Noemi_3-1708518449309.png

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).

Noemi_9-1708520673057.png

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:

Noemi_10-1708520791995.png

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...