cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Englishweb
Level 8

Cascading (dependent) radio button controls - is this possible?

Hello

I am trying (in vain) to filter the choices in a control (a listbox or combobox or radio buttons) based on radio button options previously selected.

Does anyone know how to do this?

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Level 8

Re: Cascading (dependent) radio button controls - is this possible?

@Englishweb 

I think we can work with the information you've supplied me.  Right now you have this code in the Items property of some radio buttons called RadioButtons1.

 

Filter([LabelMaths.Text,LabelAeronautique.Text,LabelSystemes.Text],Not(IsBlank(Value))). 

 

Your goal is to apply a 2nd filter, eg when "Systemes" is selected, this shows choices of "Elec" and "Python" in another control.  I would suggest you use a Dropdown control (which looks similar to a ComboBox but behaves differently) or Radio Buttons.

 

This can be done using the SWITCH function.  The SWITCH function reads-in a value and does further actions depending on what that value is.  Assuming you choose a Dropdown or Radio Buttons control you should put this code in the Items property.  Please note I have also given you the opportunity to define the options when LabelMaths or LabelAeronautique are selected.

 

Switch(
    RadioButtons1.Selected.Value,
    LabelSystemes.Text,["Elec","Python"],
    LabelMaths.Text,["Value1",Value2"],
    LabelAeronautique.Text,["Value3","Value4"]
)

 

I think this will answer your question but please reach out if you need more info.

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

5 REPLIES 5
mdevaney
Level 8

Re: Cascading (dependent) radio button controls - is this possible?

@Englishweb

In general, let’s say you have this data in A SharePoint List called ProductList

Product, ProductType
Screwdriver, Tools
Hammer, Tools
Kitchen Sink, Plumbing
Shower, Plumbing

Next we want to create some radio buttons to ask the user to select the ProductType. Put this code in the Items property of your radio buttons. The resulting buttons will be Tools, Plumbing.

Distinct(ProductsList,ProductType)

Finally, we want to create a ComboBox that will only allow a user to select a product with the same product type that was selected by the Radio Buttons. Put this code in the Items property of your ComboBox.

Filter(ProductList,ProductType=your_radio_buttons_name.Selected.Value)

Give this a try and let me know what questions you have.

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up!
Englishweb
Level 8

Re: Cascading (dependent) radio button controls - is this possible?

Hello@mdevaney

Thanks for your swift reply. The complication in my case is the first radio buttons are already a result of a filter, so they are coming from the content of other fields:

Filter([LabelMaths.Text,LabelAeronautique.Text,LabelSystemes.Text],Not(IsBlank(Value))). 

There are between 2 and 3 radio buttons selected with this filter.

I'm trying to apply a 2nd filter, eg when "Systemes" is selected, this shows choices of "Elec" and "Python" in the combobox (or another set of radio buttons). 

mdevaney
Level 8

Re: Cascading (dependent) radio button controls - is this possible?

@Englishweb 

I think we can work with the information you've supplied me.  Right now you have this code in the Items property of some radio buttons called RadioButtons1.

 

Filter([LabelMaths.Text,LabelAeronautique.Text,LabelSystemes.Text],Not(IsBlank(Value))). 

 

Your goal is to apply a 2nd filter, eg when "Systemes" is selected, this shows choices of "Elec" and "Python" in another control.  I would suggest you use a Dropdown control (which looks similar to a ComboBox but behaves differently) or Radio Buttons.

 

This can be done using the SWITCH function.  The SWITCH function reads-in a value and does further actions depending on what that value is.  Assuming you choose a Dropdown or Radio Buttons control you should put this code in the Items property.  Please note I have also given you the opportunity to define the options when LabelMaths or LabelAeronautique are selected.

 

Switch(
    RadioButtons1.Selected.Value,
    LabelSystemes.Text,["Elec","Python"],
    LabelMaths.Text,["Value1",Value2"],
    LabelAeronautique.Text,["Value3","Value4"]
)

 

I think this will answer your question but please reach out if you need more info.

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

Englishweb
Level 8

Re: Cascading (dependent) radio button controls - is this possible?

Perfect - thanks very much for your help!

mdevaney
Level 8

Re: Cascading (dependent) radio button controls - is this possible?

@Englishweb 

I'm happy your problem is solved!

 

By the way, was "Python" referring to the programming language?  Do you use it in your work too?

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 165 members 5,356 guests
Please welcome our newest community members: