web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Copy a single row of a Shareponint list with attachment

(0) ShareShare
ReportReport
Posted on by 28

Dear all,

i have created a flow that copy a single row of a sharepoint list if a specific value is set in a cell. This row have an attachment ( a jpg file) but my flow don't copy it. I have modified my flow as sow in figure. But now the flow copy all the row in the sharepoint list, not only the single row.

parte1.PNG

parte2.PNG

parte3.PNG

i think that the problem is in the first or second "apply to each", can you help me solve the problem?

 

Thanks

Cristian

I have the same question (0)
  • ScottShearer Profile Picture
    25,240 Most Valuable Professional on at
    Re: Copy a single row of a Shareponint list with attachment

    @Webfire 

    Can you confirm my understanding of your requirement?  If I understand you correctly, If an item in list A has a column set to certain value, you want to create an item in list B, copy the data from list A and include the attachments from the item in list A.

    One quick question - if the item already exists in list B do you want to create an additional item or simply update it?

     

     

  • Webfire Profile Picture
    28 on at
    Re: Copy a single row of a Shareponint list with attachment

    @ScottShearer 

    "Can you confirm my understanding of your requirement? If I understand you correctly, If an item in list A has a column set to certain value, you want to create an item in list B, copy the data from list A and include the attachments from the item in list A."

     

    Yes it's correct.

    If the item already exists in list B i prefer update it, not create an additional one

     

    Thanks

    Cristian

  • ScottShearer Profile Picture
    25,240 Most Valuable Professional on at
    Re: Copy a single row of a Shareponint list with attachment

    @Webfire 

    This is more complicated than you might think....

    In my example, ListA is a custom list where I added a column called MyText.  ListB is identical to list A except that I added a column called ListAID where I store the ID from the related item in list A.

    You'll notice that I delete any attachments to the listB item if it exists because I have no easy way to compare attachments - I just remove all attachments and then add them back.

    Post here if you have any questions.

    AttCopy1.jpgAttCopy2.jpgAttCopy3.jpgAttCopy4.jpgAttCopy5.jpgAttCopy6.jpg

  • Webfire Profile Picture
    28 on at
    Re: Copy a single row of a Shareponint list with attachment

    Congratulations for the flow, I would never have made it with my knowledge of Microsoft flow. I am only worried about solving problems, in case the flow fails.

     

    It can be simplified by creating a control column (for example "assigned_ID") in the list A. If "assigned_ID" is set to zero the flow creates the element in the list B (with attachment). If it is set to 1 the element has already been copied to the list b. It's possible?

     

    I have not given you an information, the elements that populate the list A always have only one attachment that is never modified.

     

    I thank you for the work you have done and I apologize for having changed my mind after seeing your flow.

     

    Thanks

    Cristian

  • ScottShearer Profile Picture
    25,240 Most Valuable Professional on at
    Re: Copy a single row of a Shareponint list with attachment

    @Webfire 

    Thanks for the feedback!

    You said the following:

    "It can be simplified by creating a control column (for example "assigned_ID") in the list A. If "assigned_ID" is set to zero the flow creates the element in the list B (with attachment). If it is set to 1 the element has already been copied to the list b. It's possible?"

     

    Technically, you can implement your solution but it doesn't handle situations where the data in List A is updated.  You'll still need to copy the ID column form List A to a a column in List B so that there is a link between the two items in case of an update.

     

     

  • Webfire Profile Picture
    28 on at
    Re: Copy a single row of a Shareponint list with attachment

    @ScottShearer 

    Thanks for the reply.
    In this specific case I can not manage updates.
    These two lists (in a future will be 4) manage the reports to certain work groups. List A is the parent list. All reports will end there. A person will assign them to the work group (today list B, in the future there will also be lists C, D, E) by selecting the destination from the drop-down menu. This selection triggers the flow that copies the line to the correct list.

     

    The "assigned_ID" column is a checkbox, it is set to 1 when the row is copied to the destination list. If the person, by mistake, changes the destination and the assigned_ID is set to one the flow does not copy the row again.

     

    I only understand now that it is impossible to manage updates between the elements of 5 lists. I apologize for not having understood it before.

     

    Thanks
    Cristian

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 691 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 431 Moderator

#3
developerAJ Profile Picture

developerAJ 266

Last 30 days Overall leaderboard