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

Radio buttons resetting when search boxes are used

My radio buttons are resetting when the search box is used. This is what I have for items in the gallery Filter(
Regression,
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
Function in ComboBox1.SelectedItems
) && If(
IsBlank(Filter.Text),
true,
Filter.Text in Country
) && If(
IsBlank(Search_.Text),
true,
Search_.Text in 'Focus Topic'
)
).

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @powerapps890 :

The reason is that the selection in Radio is not saved. When the data source of your gallery is refreshed, the radio control will also refresh (reset).

Please consider adopting this suggestion:

1\Add a Text field "TheRadio" in the data source "Regression" to save the Radio selection.

2\Set the radio control's OnChange proeprty to:

 

Patch(Regression,ThisItem,{TheRadio:YourRadioControl.Selected.Value})

 

3\Set the radio control's Default proeprty to:

 

ThisItem.TheRadio

 

Best Regards,

Bof

View solution in original post

7 REPLIES 7
GarethPrisk
Resident Rockstar
Resident Rockstar

What radio button? Is it a control in the Gallery itself? What is mapped to (it's Default property)?

 

What is the radio button used for?

The radio button is in the gallery. @GarethPrisk There is nothing in the default.Capture.PNG

You're using a Filter function when you may want a Search function instead.

 

You can use the Combo Boxes to control the filtering, but wrap that in a Search function so your search input can search multiple fields and handle null searches.

 

Basically, as the source of the Gallery changes, it is fundamentally resetting the controls. Since the radio buttons have a default of false, they are being reset since there is no context for which ones are true or false.

How do you wrap it ?

Hi @powerapps890 :

The reason is that the selection in Radio is not saved. When the data source of your gallery is refreshed, the radio control will also refresh (reset).

Please consider adopting this suggestion:

1\Add a Text field "TheRadio" in the data source "Regression" to save the Radio selection.

2\Set the radio control's OnChange proeprty to:

 

Patch(Regression,ThisItem,{TheRadio:YourRadioControl.Selected.Value})

 

3\Set the radio control's Default proeprty to:

 

ThisItem.TheRadio

 

Best Regards,

Bof

View solution in original post

This is causing the radio button values to not reset every time the app is loaded. Is there a way I can make it so that the buttons aren't already selected if you did a previous selection when you enter the app again? @v-bofeng-msft 

Is there a way I can do this on a user by user basis. Because currently it is loading in the same radio buttons for everyone. I don't want another user to see someone elses responses @v-bofeng-msft 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,250)