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
Super User
Super User

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
Super User
Super User

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). 

Super User
Super User

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!

Super User
Super User

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
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,893)