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 / How to edit multiple f...
Power Apps
Answered

How to edit multiple forms in app without creating a new form submission

(0) ShareShare
ReportReport
Posted on by 26

I am using SharePoint Custom Forms. I have 2 forms on a screen that I need to submit to the same data source. I have used the Patch function and it works as far as submitting the forms together, but I am not able to Edit the current form. When I click the submit button after editing my form, it creates a brand-new form. Below is my code for OnSubmit.

 

 

Patch('Sharepoint Form',Defaults('Sharepoint Form'),Submitter_Info.Updates, IT_Form.Updates));

 

 

Here is my OnEdit in SharePointIntegration and also my Edit Button OnSelect:

 

EditForm(Submitter_Info); EditForm(IT_Form);

 

I am not using a Gallery. I want to make this form as simple as possible to navigate for our users. I have added an ID field to both forms. What am I missing?

 

shgall02_2-1668471004952.png

 

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @shgall02 ,

     

    Defaults(<data source>) means create a new record.

    vxiaochenmsft_0-1668479332906.png

     

    So please try this:

    If(Submitter_Info.Mode=FormMode.New&&IT_Form.Mode=FormMode.New,Patch('Sharepoint Form',Defaults('Sharepoint Form'),Submitter_Info.Updates, IT_Form.Updates),
    Patch('Sharepoint Form',SharePointIntegration.Selected,Submitter_Info.Updates, IT_Form.Updates))

     

    Best Regards,

    Wearsky

  • shgall02 Profile Picture
    26 on at

    That worked! I am forever grateful! Than you so much 😁

  • Lucas_Santana_ Profile Picture
    4 on at

    Hello @v-xiaochen-msft 

     

    I tried to use your code but I found a problem in sharepointintegration.selected.

     

    My code doesn't recognize it. Could you please help me?

  • shgall02 Profile Picture
    26 on at

    In your app do you see SharePointIntegration?

    shgall02_0-1670355181712.png

    If not, this code won't apply. If you do, in each of my form Items, I have 

    If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First('Sharepoint Form'),SharePointIntegration.Selected)

    Hopefully, this works for you and here is a link with more info on SharePointIntegration:

     

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/sharepoint-form-integration

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard