10-13-2023 10:58 AM
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 ?
10-13-2023 12:01 PM
Hi Venkat,
please see the below article if that helps
10-14-2023 06:44 AM
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.
11-24-2023 10:37 AM
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
11-24-2023 10:38 AM
11-24-2023 11:22 AM
Hi Richard,
The above 2 screenshots might help you.
I followed similar to above and i was able to get the default value.
Balaji V
11-24-2023 12:24 PM
That's great! Thanks for the quick response. I have had some success now with the new code, so thanks for clearing that up!
I also found quite a useful article here in case anyone else was interested but it's similar to the code you suggested.
Stop confusion with empty parameters in Dashboards - OneStream Community (onestreamsoftware.com)
Thanks again,
Richard
10-14-2023 07:51 AM
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.
10-18-2023 04:41 AM - edited 10-18-2023 04:42 AM
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
10-19-2023 02:00 AM
Thanks a lot Christian.