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

Use combobox to filter radio button selection

This is in my onvisible for the screen ClearCollect(RadioItems, "Works","Issues","Does not work"); Collect(
colRadio,
{
Id: "",
RadioSelection:""
}
);  This is radio items - RadioItems.Value. This is the filter for the items in the gallery Filter(
GUAT,
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
Area in ComboBox1.SelectedItems
) && If(
IsBlank(Search_.Text),
true,
Search_.Text in Namee
)). I have a combobox1_1, I set the items to RadioItems. How can I manipulate the filter so that when the radio button is clicked I can choose a drop down for works, has issues and doesn't work. 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @powerapps890 :

Do you want combobox1_1 to allow multiple selections?

Please set the gallery's Items property to:

Filter(
GUAT,
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
Area in ComboBox1.SelectedItems
) && If(
IsBlank(Search_.Text),
true,
Search_.Text in Namee
) && If(IsBlank(combobox1_1.Selected),true,Radio in combobox1_1.SelectedItems.Value)
)

Best Regards,

Bof

 

View solution in original post

7 REPLIES 7
EricLott
Resident Rockstar
Resident Rockstar

Could you provide a screenshot? I'm having a hard time visualizing your needs. Or could you explain more about the specific problem you are having and what you want to accomplish.

 

Thank you

Annotation 2020-08-16 163423.jpg

that is the drop down for my combobox. The items are called RadioItems. Annotation 2020-08-16 163553.jpg- This is in my onvisible, I just want to modify my items in the gallery so that it will filter based on which radio button is pressed and then what is chosen in the combobox. This is the items Filter(
GUAT,
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
Area in ComboBox1.SelectedItems
) && If(
IsBlank(Search_.Text),
true,
Search_.Text in Namee
)) @EricLott 

Hi @powerapps890 :

Do you want to use a comboxbox to filter on the value of the Radio option in the Gallery?

If so,I suggest you add a New column to the data source(GUAT) to store the value of the radio.Please try this solution:

I assume combobox1_1 do not allow multiple selections.

1\Add a text type field named Radio to GUAT.

2\Set the gallery's Items property to:

 

Filter(
GUAT,
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
Area in ComboBox1.SelectedItems
) && If(
IsBlank(Search_.Text),
true,
Search_.Text in Namee
) && If(IsBlank(combobox1_1.Selected),true,Radio=combobox1_1.Selected.Value)
)

 

3\Add a radio control(Radio1) into this gallery.

Items

 

RadioItems

 

Default

 

ThisItem.Radio

 

4\Set the Radio control's OnChange property to:

 

Patch(GUAT,ThisItem,{Radio:Radio1.SelectedText.Value})

 

53.gif

Best Regards,

Bof

This works, but is there a way to show both works and has issues if both are selected? @v-bofeng-msft 

Hi @powerapps890 :

Do you want combobox1_1 to allow multiple selections?

Please set the gallery's Items property to:

Filter(
GUAT,
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
Area in ComboBox1.SelectedItems
) && If(
IsBlank(Search_.Text),
true,
Search_.Text in Namee
) && If(IsBlank(combobox1_1.Selected),true,Radio in combobox1_1.SelectedItems.Value)
)

Best Regards,

Bof

 

View solution in original post

Hello, your solution works, but I have drastically changed the app since and now I can't get it to work. So, my default for the radio button is If(var,"",
LookUp(GUATResponses, Title=vUserMail && GUATListID=ThisItem.ID, RadioValue)
) and this is the onchnage Patch(
GUATResponses,
Coalesce(
LookUp(GUATResponses, Title=vUserMail && GUATListID=ThisItem.ID),
Defaults(GUATResponses)
),
{Title: vUserMail, GUATListID: ThisItem.ID, RadioValue: Radio4.Selected.Value}
); How can I alter the default so that your solution will work @v-bofeng-msft 

I can't just use ThisItem.Radio

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,637)