web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Critical: Patch comman...
Power Apps
Answered

Critical: Patch command reset the edit form

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All, 

Application data source: SharePoint

I am Using Edit forms to edit current item data. 
Issue:  
I am having a custom powerapp to show supplier information approval form.

Item property: LookUp(SupplierDetails, ID=currentRecID)

This information also needs some attachments to be uploaded. Hence I have another form specially for attachments. 

These 2 forms are toggled between using buttons. Since there are some customized fields, I cannot have attachments in form 1. 

I submit the attachments using: Patch(SupplierDetails, {ID:Value(recordid)}, AttachmentsForm_1.Updates) 

 

When this patch runs, it also reset the data changed by user on another form TO original data. 

And some text fields which are populated using variables, they get cleared/blank. 

 

Need some urgent suggestions on this! Thanks!  

 

Categories:
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Is the items property of both forms the same?

    Also, just saying that you can use one form even if you have custom fields. You can use Patch which will take care of tour custom fields and then within Patch you can do FormName.Updates which will basically act like a SubmitForm for your attachments.

    Something like this:
    Patch(Datasource, Defaults(Datasource), {Column1: Value}, FormName.Updates)

    Let me know if this works.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit Bhatia
    https://thepoweraddict.com
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

    Thanks,
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard