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 Apps
Unanswered

Copy Record(s)

(0) ShareShare
ReportReport
Posted on by 525

Hi Reader,

 

I'm having a gallery with bunch of records, on select of each record I'm collecting into a collection. now on click of copy button i want create exact copy of the records except 1 column. 

Categories:
  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @Krishna_R ,

    You can achieve this by adding a button or an Icon to the record which indicates User to 'duplicate' the record.

    OnClick of button/Icon.

    1. Create collection of the record selected.

    2. Use Patch function like,

            Patch(<DataSource>, Defaults(<DataSource>), { Name: First([@Collection]).<columnName>, ...etc...>} )

        Here, do not put the column which you would like to ignore. Others will be added accordingly as above

    3. Clear Collection

     

    This will create a new record with duplicating all values of record User selects except 1 column.

    Hope this helps

  • Krishna_R Profile Picture
    525 on at

    Hi @Ethan_R ,

    the requirement is to create multiple item copies at a time. like patching multiple records that are in the collection into db 

  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @Krishna_R ,

    Okay,

    So as you said you can add multiple records into the collection and you like to create those copies respectively.

     

    You can use a single button/Icon indicating 'Copy/Duplicate' records and when User clicks it perform below actions,

     

    ForAll(
     <Collection>,
     Patch(<DataSource>,Defaults(<DataSource>),
     {
     <Field Name (NAME)>: <ColumnName_from_Collection>,
     <Field Name (Status)>: <ColumnName_from_Collection>,
     ....
     ....as much field data you want to add.
     }
     )
    )

     

    Don't put the field into Patch function that you would like to exclude in duplicated records.

    Clear collection.

     

    Additionally Note: You can also change/add another value while patching a field directly for example,

         Assume having a field that monitors number of times the record is duplicated (Revision Count).

         you can enter as <field Name (Revision Count)>: Value(<column_collection>)+1

    Or you can change lookUp value to any if exist.... It all depends on datatype present and content you modify.

     

    Hope this helps.

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard