Announcements
I want to set a field to yes when submit button is clicked ? I there a way to do this in PowerApps ?
Yes, use the Patch() function
Thanks Meneghino,
I checked the patch function. Its more like if i want to update a record. But if i want to set field on submit button click on new item form. Can it be used there ? If possible can you please post an example syntax.
Hi @manjotsingh057,
That depends on where the field for the Yes stored.
If the Yes field is stored within the record submitted by the Submit button, Assuming the Yes field is a text field, then we could take use of the patch () with the following format:
Patch(DataSource, EditForm.LastSubmit, {YesField:"Yes"})
And if you stored the Yes field in other data source other than the one specified with the Submit button, then you need to specify the corresponding data source the records in the patch function.
Patch function in PowerApps
Regards,
Michael
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 352 Most Valuable Professional
11manish 192
Valantis 128