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 Form - How ...
Power Apps
Answered

Power Apps Form - How to edit SP list item in form from gallery and save it as a new SP list item

(0) ShareShare
ReportReport
Posted on by 85

Dear Power Apps gurus, 

 

I would like to ask your advice for the following case:

 

1. I have an app with a standard form created from a predefined SP list

2. Besides the new Form records submitted to SP list I have also included a gallery containing all SP list items (previously submitted forms). I would like to give users a chance to go to app, get existing SP list item/record (previously submitted app record) and make subsequent changes if needed. 

 

Details:

- a gallery with search where I find the item to be modified

mesan123_0-1639478761983.png

- if arrow is clicked it takes me to the form with pre-filled fields from the gallery

mesan123_3-1639479980325.png

 

mesan123_1-1639479877135.png

Now I would like to change a couple of fields and submit the form as a new one. If I do it now, the original SP record is overwritten/updated by the changes I made. 

 

Could you please advise how to save edited form as an new record in SP list?

Thanks a lot for your comments. 

 

 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @mesan123 

    If you want it to be a new record, then set the Item property to:

       Patch(gal_Existing_Form.Selected, {ID:Blank()})

     

    This will create a duplicate of the record you are editing.

     

    I hope this is helpful for you.

  • mesan123 Profile Picture
    85 on at

    Hi @RandyHayes,

    Using the code Patch(gal_Existing_Form.Selected, {ID:Blank()}) the new record is created but if I do changes in the form the changes are disregarded and the new SP list item is created as a duplicate of the original item. But I would need to save the form with edits.

    Thank you for your help.

  • mesan123 Profile Picture
    85 on at

    I am just thinking if there is a way how to only prepopulate the fields in the new form from the gallery (original form), then change whatever is needed and submit it as a new record, this would help..

    Thank you

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @mesan123 

    Yes, the original formula I provided will give you the capability to select a gallery record and then have that appear in the EditForm, make changes, and then when saved, it will create a new record with all of the edits made.

     

    I am not sure if you are asking that not only does it create a new record, but that it is supposed to also edit the existing record as well !?!?  I am not sure what issue you are having...please explain.

  • mesan123 Profile Picture
    85 on at

    Hi @RandyHayes 

    Sorry for the confusion. What I wanted to say is that Patch(gal_Existing_Form.Selected, {ID:Blank()}) in my case creates the new record which is 100% identical with the original one even though changes have been made in the EditForm i.e. all the edits are disregarded and the original form is duplicated in SP list with a new ID. 

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 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard