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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps Edit Form o...
Power Apps
Unanswered

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard