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
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (19,115)