cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Filter Radio Buttons with Combobox

I had this functionality working but now it is not. I just want to be able to filter based on if the radio button says works/issues/fails. This is my filter Filter(
collGUATMasterData,
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
System in ComboBox1.SelectedItems
) && If(
IsBlank(ComboBox1_2.Selected.Result) || ComboBox1_2.Selected.Result = "All",
true,
Scenario in ComboBox1_2.SelectedItems
) && If(
IsBlank(Search_.Text),
true,
Search_.Text in Namee
) && If(
IsBlank(ComboBox1_1.Selected),
true,
Radio in ComboBox1_1.SelectedItems.Value
)
) The radio combobox has items of RadioItems. In my onvisible I have this ;ClearCollect(RadioItems, "Works","Issues","Fail"); How can I fix this issue. Capture.PNG

12 REPLIES 12
Highlighted
Super User II
Super User II

Is this the behavior that you are trying to achieve? 

RadioFiltering.gif

If so, I have the Items property of the gallery set to:

Filter('Student Scores', IsBlank(ComboBox3.Selected) || 'Compliance Status'.Value = ComboBox3.Selected.Value)

If you are allowing multiple selection in your combo box for radio button options, then the formula will change slightly:

Filter(IsBlank(ComboBox3.Selected) || 'Compliance Status'.Value in ComboBox3.SelectedItems)

You might run into delegation issues with the 2nd expression, so let me know if that will be an issue for you and we can fix that as well. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

Highlighted

I want the second because it can I want the combobox to filter on multiple things. But mine is different because the items for the combobox are RadioItems and this is declared in my onvisible with ClearCollect(RadioItems, "Works","Issues","Fail"); So it is not pulling it from a datasource because I am creating a collection. @PowerAddict 

Highlighted

It doesn't matter if you are using a collection or a datasource as in my example. A collection is also a datasource. 

 

If you want the exact expression, please share the following details: 

1. Name of the collection/datasource that you are using to populate the gallery i.e. the Items property of the gallery

2. Name of the combobox that you are using for radio buttons that has its Item property set to the radio button collection

3. The column/field name in the collection/datasource in the gallery that is used to populate the radio button

 

If I understood your expression and the control names correctly, one of the following should work: 

Filter(
    collGUATMasterData,
    (IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All") || System in ComboBox1.SelectedItems,
    (IsBlank(ComboBox1_2.Selected.Result) || ComboBox1_2.Selected.Result = "All") || Scenario in ComboBox1_2.SelectedItems,
    IsBlank(Search_.Text) || Search_.Text in Namee,
    IsBlank(ComboBox1_1.Selected) || Radio in ComboBox1_1.SelectedItems.Value
)

Or

Filter(
    collGUATMasterData,
    (IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All") || System in ComboBox1.SelectedItems,
    (IsBlank(ComboBox1_2.Selected.Result) || ComboBox1_2.Selected.Result = "All") || Scenario in ComboBox1_2.SelectedItems,
    IsBlank(Search_.Text) || Search_.Text in Namee,
    IsBlank(ComboBox1_1.Selected) || Radio in ComboBox1_1.SelectedItems
)

Let me know if this helps. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

Highlighted

1. The items property off the gallery

Filter(
collGUATMasterData,
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
System in ComboBox1.SelectedItems
) && If(
IsBlank(ComboBox1_2.Selected.Result) || ComboBox1_2.Selected.Result = "All",
true,
Scenario in ComboBox1_2.SelectedItems
) && If(
IsBlank(Search_.Text),
true,
Search_.Text in Namee
) && If(
IsBlank(ComboBox1_1.Selected),
true,
Radio in ComboBox1_1.SelectedItems.Value
)
)

2. It is called Combobox1_1 and has the items called RadioItems

3. This is how the radio buttons are populated

If(var,"",
LookUp(GUATResponses, Title=vUserMail && GUATListID=ThisItem.ID, RadioValue)
) - The datasource is called GUATResponses

 

I tried both of your filters and it didn't work..I am assuming we need to call GUATResponses somehow ? @PowerAddict 

Highlighted

Yes thats what I was trying to get to in my previous post. I will take a look in a few minutes and get back to you. Also, what is the var variable in the radio property in your expression? 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

 

Thanks!
Hardit Bhatia
Microsoft Business Applications MVP
https://thepoweraddict.com

Highlighted

It is a reset button - this is the onSelect for the button Set(var,true) @PowerAddict 

Highlighted

Am a little confused but here is another suggestion. Do you have a column in the collection that stores the Radio value so you don't have to do a lookup within the gallery? That might be a cleaner approach as well. 

 

If you can do that, then the Items property of the gallery should work. Let me know if it doesn't and we can take a look at it together. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Highlighted

I have this in my onvisible Collect(
colRadio,
{
Id1: "",
RadioSelection:""
}. I have a column Id1 and RadioSelection in my datasource @PowerAddict  I dont even remember why I have it. So how can we get the current items without using the lookup because each time its loaded there will be a lookup for previous answers but it needs to filter on the new answers too. @

Highlighted

Hello, I am still stuck on this Filter(
collGUATMasterData,
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
System in ComboBox1.SelectedItems
) && If(
IsBlank(ComboBox1_2.Selected.Result) || ComboBox1_2.Selected.Result = "All",
true,
Scenario in ComboBox1_2.SelectedItems
) && If(
IsBlank(Search_.Text),
true,
Search_.Text in Namee
) && If(
IsBlank(ComboBox1_1.Selected),
true,
Radio in ComboBox1_1.SelectedItems.Value
)
)- that is the items filter. @PowerAddict  I really need to get this combobox working. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (10,385)