cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
LOGiT
Level: Powered On

Set field to true when user clicks Save button

Hi, In my powerapps tablet app, the user edits a record (from my 'Assets' sharepoint list). When they're done, they press the Save button. I have a boolean field in my 'Assets' sharepoint list called 'Inspected'. I want to set it from false to true for the current record in the app when the user presses the Save button. I am going banana's trying to work it out. Please help me!
1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft Employee

Re: Set field to true when user clicks Save button

Hello @LOGiT,

You can do this in one of the following ways:

1. Use "Patch" function to update the boolean field after the form is successfully submitted (EditForm.OnSuccess=Patch(...)). The following page contains details about the patch function: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

2. You can add a custom card with a checkbox control to your form and bind the Boolean field to it. The CheckBox can have it's Default property set to true which will update the bound field automatically since the parent card's Update property is set to "CheckBox.Value". You can then Hide the control so it is not visible in your form.

Hope this helps.

2 REPLIES 2
Microsoft Employee

Re: Set field to true when user clicks Save button

Hello @LOGiT,

You can do this in one of the following ways:

1. Use "Patch" function to update the boolean field after the form is successfully submitted (EditForm.OnSuccess=Patch(...)). The following page contains details about the patch function: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

2. You can add a custom card with a checkbox control to your form and bind the Boolean field to it. The CheckBox can have it's Default property set to true which will update the bound field automatically since the parent card's Update property is set to "CheckBox.Value". You can then Hide the control so it is not visible in your form.

Hope this helps.

LOGiT
Level: Powered On

Re: Set field to true when user clicks Save button

Hi, Thank you. I've been scared to try the Patch function but it works well. Really appreciate the help.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 35 members 4,269 guests
Please welcome our newest community members: