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

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
eka24
Super User
Super User

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
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (4,194)