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 / Power Apps Edit Form o...
Power Apps
Answered

Power Apps Edit Form overwrites existing data

(0) ShareShare
ReportReport
Posted on by 15

 

Hello,

 

I have a problem when editing existing records. I have existing records in my sharepoint list and I want to retrieve them from the gallery. But since I need to make adjustments every now and then, I want to edit individual entries. But for this I want to create a new record without overwriting the existing one.

 

SubmitForm() overwrites my existing entries. Is the a way, how i can edit my existing entries with creating a new form like NewForm()? I do not want to transfer everything manually. 

 

Thanks for helping me! 

Categories:
I have the same question (0)
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @EP1846 ,
    SubmitForm(FormName) function in Power Apps can overwrite (edit) or create a new entry in the data source depending on the form mode. So if you have set you form mode as edit and when you navigate to your form you use NewForm(FormName) function, it will open in New mode (entry creation mode). If you would like to edit/update existing entries, let the form mode be Edit, add Item property to your form - LookUp(ListName, ID=Gallery.Selected.ID) and use EditForm(FormName) function with Navigate function to open the form in Edit mode.

  • Verified answer
    Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @EP1846 ,

     

    You can use Patch function in this case,

    Let's say you select a record and navigate to Form where you have the gallery selected data.

    Add a button for creating new Record with existing records as follows:

    //OnSelect of the Button
    
    Patch(
     <Datasource>,
     Defaults(<Datasource>),
     {
     <fields>: <datacardvalues>
     }
    )

     

    Hope this helps

  • shanecosgrove Profile Picture
    62 on at

    Due to the Items property of the form being set to the selected record - I don't think you can submit it as a new entry.

     

    One solution would be to create a new form and set its items to Defaults("Your Datasource") and then for each Datacardvalue set it to Gallery1.Selected."Each DataCard Value". You could then set the visibility of this form to false and use the submit button to submit this form rather than the original items form.

  • Cr1t Profile Picture
    555 on at

    @EP1846 

    Hi please follow the steps.

     

    In a new screen add a Edit form.

    Edit form Data source --> Add your SharePoint list.

    Edit form items --> Gallery1. Selected

     

    Add a Edit icon from icon

    OnSelect of Icon --> EditForm(nameofyoureditform); Navigate(screen where editform is present)

     

    Submit button on edit form screen.

    SubmitForm(Name of your edit form)

     

    Let me know if this works.

     

    Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

     

     

     

     

  • EP1846 Profile Picture
    15 on at

    Thank you so much! It worked for me. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard