cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User II
Super User II

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
News & Announcements

Community Blog

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

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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