cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zoref
Frequent Visitor

Duplicate an existing record and edit

Hi,

Need some help on PowerApp that has SharePoint as data source.

My requirement is to copy an existing record from the gallery > the copied record should open in edit mode to allow the user to make edits and on submission the record should save in SharePoint list as a new item.

 

Any inputs would be helpful.

 

Regards

Zoref

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @zoref :

I assume there is a list named "ListA"

1.JPG

1\Add a gallery(Gallery4) to select the item you want to copy

items

ListA

2\Add an edit form(Form1)

DataSource

ListA

Item

Gallery4.Selected

3\Add a button and set it's OnSelect property to

Patch(ListA,Defaults(ListA),Form1.Updates);ResetForm(Form1)

18.gif

Best Regards,

Bof

View solution in original post

3 REPLIES 3
v-bofeng-msft
Community Support
Community Support

Hi @zoref :

If you need such a function, I suggest you use Patch instead of SubmitForm to submit records.

Patch(YourSPList,Defaults(YourSPList),EditFormName.Updates);
ResetForm(EditFormName) /*reset the form*/

Best Regards,

Bof

Thank You.

Would be great if you could help with more elaborative explanation as to how to get the form copied and open in a new screen and then edit and patch.... 

Am new to PowerApps and your inputs are valuable to me

v-bofeng-msft
Community Support
Community Support

Hi @zoref :

I assume there is a list named "ListA"

1.JPG

1\Add a gallery(Gallery4) to select the item you want to copy

items

ListA

2\Add an edit form(Form1)

DataSource

ListA

Item

Gallery4.Selected

3\Add a button and set it's OnSelect property to

Patch(ListA,Defaults(ListA),Form1.Updates);ResetForm(Form1)

18.gif

Best Regards,

Bof

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (38,618)