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 / "Submit" after "Edit A...
Power Apps
Answered

"Submit" after "Edit All" creating a new item in SharePoint

(0) ShareShare
ReportReport
Posted on by 118

Hello Friends, 

I'm having an issue with SharePoint integration and I can't find a solution that is specific to my needs.

 

When opening the PowerApp in the SharePoint list to make edits ( via "Edit All"), my submit button creates a new item instead of updating the forms. I have more than one form on the screen to submit. 

 

My submit button formula is: 

Patch('PCAR- Testing',Defaults('PCAR- Testing'),Form4.Updates,Form5.Updates,Form6.Updates,Form7.Updates,8.Updates)

 

If I'm using .Updates, I'm not sure why it is creating a new item. I am also very NEW at powerapps. Any and all help is appreciated.

 

Thanks! & Happy Holidays Everyone

 

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    The problem is in your Patch statement on the submit. When the second parameter of a patch statement is set to defaults(datasource) it will always create a new record. To update an existing record you need to supply something that selects the specific record you want to update as the second parameter.  This is usually a Lookup.

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @ebraga ,

     

    The major source of conflict is Defaults('PCAR- Testing'). Defaults function in Patch is to create a new record. Reference: Patch .

    You have to add a condition into Submit button to check if the form is in Edit or New mode. Put the following codes to OnSave property of SharePointIntegration.

     

    Patch('PCAR- Testing',If(SharePointForm1.Mode=FormMode.Edit,SharePointIntegration.Selected,SharePointForm1.Mode=FormMode.New,Defaults('PCAR- Testing')),SharePointForm1.Updates);ResetForm(SharePointForm1); RequestHide()

     

     Sik

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard