Setup a Toggle (Checkbox) to Repopulate a Dropdown Filter

Hey there,

I’m just inquiring about whether a Dropdown filter can be re-populated based on the click action from a Toggle (On/Off) checkbox?

To give a high-level scenario, the data Supervisors/Managers Dropdown Filter is populated through a Bridge Parameter containing a full list of Supervisors & Managers. On the initial page load of the BI Visualization, there’s a toggle button with the options of Supervisors & Managers, and the Checkbox will default to Managers, so I’m seeing if there’s a way this click interaction will also re-populate the Supervisors/Managers Dropdown to only return the list of Managers?

Is this possible? And if so, any suggestions on how I would set up this type of click interaction between the Toggle (Checkbox) <> Dropdown Filter?

While definitely complex, this could be feasible.

Since you’re using a bridge parameter, I’m assuming the full list is in the form of a user hierarchy, right? So, what you’ll want to do is base this user hierarchy off a parametrized data cube (which has a parameter to specify managers/supervisors). Then after you have the bridge parameter and the data cube set up, you could script the dashboard to call a corresponding filter control’s getMembers method and specify the inheritedFilterValues parameter based on the toggle status.

https://www.dundas.com/support/api-docs/js/#API%20Reference/dundas/data/HierarchyService/Methods/getMembers.html

You would be likely passing a single element array containing a single ParameterValue object. You can find the parameterId you want to assign to this object in the network trace from the hierarchy designer after opening the hierarchy itself.

https://www.dundas.com/support/api-docs/js/#API%20Reference/dundas/data/ParameterValue/cindex.html

Hi - Christian’s answer may work best for you, but there are some other things that could be worth mentioning here as well for the forum.

  • Since I think you have two toggle buttons, if you found a way to have two separate filters populated correctly for each, you could switch between them rather than re-populating one. A radio button list component can have a separate change layer action (and/or other actions) set up for each button by assigning it as the Bound Visual.

  • (You’re using a bridge parameter, but in case you weren’t, the Dependent Filters option is able to update one filter based on the other if you were using two filter controls.)