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 / Copy one item in Galle...
Power Apps
Answered

Copy one item in Gallery as a new record - errors

(0) ShareShare
ReportReport
Posted on by 1,994

 

hi I trying to copy selected items in a gallery one row into a new records with new ID.. it's not working? 

 

What did I miss?  Thank you

Records are in Gallery  picking up from SP list, I want to patch existing records - the same data as a new row of record with new ID one time only not to duplicate or auto copy again..

 

and save back to SP list as a new row record..  do I need to reset also somewhere???

both not working.. 

 

 

Select(Parent); Patch(List,LookUp(List,ID=ThisItem.ID)
{ Cat:{Value: CatG1.Text},
Type: {Value: TypeG1.Text},
C: {Value: CG1.Text},
IO: {Value: IOG1.Text},
Com: {Value: ComG1.Text},
Cod: {Value: CodG1.Text},
J: JG1.Text,
no: noG1.Text,
Date: DateG1.SelectedDate,
Amt: Value(AmtG1.Text)})

 

why the patch not working???  Thanks

bbsin_0-1622628010137.png

Categories:
I have the same question (0)
  • SaiKrishnaGudluru Profile Picture
    499 on at

    to copy existing data from the Gallery, you can simply use Gallery1.Selected to read the entire record and perform required actions on it.

  • bbsin Profile Picture
    1,994 on at

    Hi @krishnags 

     

    I want to copy record inside the gallery by row, user can select and duplicate the data they want to duplicate and it will appears as same item but with a new ID - one copy 

     

    not the entire gallery. thx

     

  • Verified answer
    v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @bbsin ,

    I have answered this question in below thread. 

    Solved: question - is there any way to patch a row of reco... - Page 2 - Power Platform Community (microsoft.com)

    I will also post my code here so that other users who have similar question can directly found the solution when search this kind of issue.

    Set(varRecord,LookUp(List,ID=Gallery.Selected.ID));
    Patch(List,Defaults(List),
    {
    Choice1:{Value:varRecord.Choice1.Value},
    Number1:Value(varRecord.Number1),
    date1:varRecord.date1,
    Text1:varRecord.Text1,
    ...
    })

    Best regards,

    Allen

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

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard