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 / Duplicate an item with...
Power Apps
Unanswered

Duplicate an item with attachments

(0) ShareShare
ReportReport
Posted on by 45

Hi,
I duplicate an item from a Sharepoint list with PowerApps. All data has been duplicated except attachments.

the command:

If(IsBlank(Patch(
'Demande Capex'; Defaults('Demande Capex');
Form4.Updates)))
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,440 Most Valuable Professional on at

    Hi @Abdou1 ,

    You can use Power Automate on the OnSuccess of the new record form - send the old and new IDs and get the attachments from the original one and attached them to the new record.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Abdou1 Profile Picture
    45 on at

    I'm a beginner, can you show me how to do it?

     

    my command on the Onselect property of the button

    If(IsBlank(Patch('Demande Capex'; Defaults('Demande Capex');Form4.Updates)))
  • WarrenBelz Profile Picture
    156,440 Most Valuable Professional on at

    @Abdou1 ,

    What exactly are you doing here ?

    If(
     IsBlank(
     Patch(
     'Demande Capex'; 
     Defaults('Demande Capex');
     Form4.Updates
     )
     )
    )

    Your IsBlank has no resulting action. 

  • Abdou1 Profile Picture
    45 on at

    Hi @WarrenBelz 

    Form4 is an edit form. Instead of the item being modified, I duplicate it. I deleted Isblank, still the same result

  • WarrenBelz Profile Picture
    156,440 Most Valuable Professional on at

    @Abdou1 .

    Now that is sorted (IsBlank had no purpose), you can do this - firstly, I assume you selected the original item from a gallery ? If so, you can get both IDs

     

    Set(
     gblOldID,
     YourGalleryName.Selected.ID
    );
    Set(
     gblNewID,
     Patch(
     'Demande Capex'; 
     Defaults('Demande Capex');
     Form4.Updates
     ).ID
    )

     

    Now do a Flow and send both IDs - if you are now familiar with Power Automate, this may be difficult for you

    CopyAttachmentsFlow.png

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

     

     

  • Abdou1 Profile Picture
    45 on at

    @WarrenBelz 

    Thank you very much for your help. Now how to link the "duplicate" button to the flow?

  • WarrenBelz Profile Picture
    156,440 Most Valuable Professional on at

    @Abdou1 ,

    Have you done any Power Automate from Power Apps before ? If not, you might start with this article.

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 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard