cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

How to change a field value in Gallery base on a Radio Button sellection?

I am trying to change the value of a field in gallery base on a checkbox selection and radio button. How can I do that?

4 REPLIES 4
Super User III
Super User III

From the when the checkbox is ticked, do you want to change the sign off to another option? if so then
On the Travel status textbox default put: If(Checkbox1.Value,"Sign off"," ")

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Thanks.

 

I want to change the Travel Status field to the value selected in the radio button if the checkbox is checked. 

With that understanding,
Set a variable OnVisible of the screen to store the selected item:

Set(MyItem,Radio2.Selected.Value)
Then in the default of the Trevel status field put:
If(Checkbox3.Value=true,MyItem," ")
Change Checkbox3 and Radio2 to actual names.
 
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @andygp25 

set the Checkbox OnSelect property to Patch() the record, something like:

 

Patch(datasource,ThisItem, {travelstatus:Radio.Selected.Value})

 

For the checkbox to stay checked you will have to have a field in your datasource, like "checked", to save it to as a true or false and have the default property of the checkbox reflect that field. You will also need to add that to the Patch.  If that isn't necessary, you could just put an icon in the gallery with the Patch() as its OnSelect property. 

Patch(datasource,ThisItem, {travelstatus:Radio.Selected.Value,checked:true})

 

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (6,938)