Skip to main content
Newcomer
October 13, 2023

Default Value of a Delimited List Parameter Not Working

  • October 13, 2023
  • 3 replies
  • 0 views

Hello Everyone,

I am using a Delimited List Parameter which results a list of comma separated values from SQL through XFBR.

When i use this parameter in Dashboard, it always shows as blank when it starts up, even though i have set the default value property.

Looks like its a limition at this point of time.

Are the any alternate ways we can use the default value for Delimited List Parameter in Dashboards ?

3 replies

Contributor
October 13, 2023

Hi Venkat,

please see the below article if that helps

https://medium.com/@sudhakar.essbase/onestream-passing-application-currency-as-a-parameter-in-dashboard-87c474483bab

OneStream Employee
October 14, 2023

Default values can be a bit funny, because of quirks with how they're (not) populated when the list of choices is not known at the very beginning.

One workaround is to have an extender running at dashboard load, pushing a default value directly in the parameter.

Newcomer
November 24, 2023

Hi Jack,

Thanks for this comment - I'm having this exact problem! Do you happen to have (or has anyone else listening) any example code for a dashboard extender that would push a value into a parameter?

I've been using the following which is essentially using the brapi.dashboards.SetLiteralParameterValue command but I've found it doesn't always work. In fact I believe I might have misunderstood the basic function of this code as what it seems to do is populate the "Default value" of a parameter rather than the actual value assigned to it (the latter is what I'm trying to do).

Any suggestions would be welcomed!

Regards,
Richard

OneStream Employee
October 14, 2023

In the past, I also used xfbr to create comma separated lists for Delimited List Parameters. I did it to overcome problems I had with dynamic Bound List Parameters, if they needed parameters to query the database as well.

The error was caused because the custom parameter dictionary was not yet populated. To avoid the problem, you just need to test, if the custom parameter dictionary has data, before you run your code.

I‘m not at my desk, I will post a sample Monday.

OneStream Employee
October 18, 2023

And here is the code sample:

For Each paramValue As String In args.NameValuePairs.Values
	If StringHelper.DoesStringHaveCustomSubstVars(paramValue) Then Return Nothing
Next

You have to place it after this

Case Is = DashboardDataSetFunctionType.GetDataSet

and before any other if or select statementIf any argument contains unresolved parameters, it won't continue.

I hope this helps and cheers

 

VENKAB05Author
Newcomer
October 19, 2023

Thanks a lot Christian.