Question
· May 19

BI Analytics default key:value pair in termlist

I have a widget that uses "choose Data source" control option. Termlist for the control consist of the two data sources and i want to set one of them by default. For example: I have two data sources, one is grouped by month, the other by year. I need to set the one that is grouped by year by default 

Using default value at the bottom return an error

How can i achive that?

 

Product version: IRIS 2024.3
Discussion (2)2
Log in or sign up to continue

Hi Dmitrij,

In IRIS 2022.3 and later versions, we display the name of the data source you chose for the widget as the default value for any Choose Data Source control on the widget. If that data source is a value in the termlist your Choose Data Source control uses, its key from that termlist should be shown.

This is how the Dynamic Dashboard in Samples-BI works. There is a widget that should display a pivot called "Use in Dashboards/For Patients Scorecard.pivot" by default, so the widget's Data Source (under Type & Data Source) is set to "Use in Dashboards/For Patients Scorecard.pivot", like it would be for any widget. To allow users to change data sources, there is a Choose Data Source control. Since "Use in Dashboards/For Patients Scorecard.pivot" appears as a value in the termlist associated with that control, the control displays the associated key from the termlist ("Patients by Diagnosis"). If that value did not appear in the termlist, the control would display the full pivot name ("Use in Dashboards/For Patients Scorecard.pivot"). In either case, the widget defaults to displaying the pivot listed as its Data Source.

If the above isn't working as expected for you, or if you are trying to do something different, please provide some details about how you're trying to use this control. I see the same error message as you if I try to change the control's Default Value, but I don't recommend using that option for Choose Data Source controls (the documentation mentions that Default Value only applies to filter controls).