Skip to main content

Notifications

Power Platform Community / Forums / Building Power Apps / Move a document to one...
Building Power Apps
Suggested answer

Move a document to one library to another

Posted on by 10
Hello everyone,
 
I have a Sharepoint library that is related to a Sharepoint list through the ID and the IDCompany column. What I want is to be able to move the information from the list to another and also the file to another library but that both remain connected through the IDCompany.
 
On the left side I have my Sharepoint List and on the rigth I have my Library
 
 
To move the information from the Sharepoint List I use this flow 
 
But I stil don't know how I can obtain the new ID after moving the information and use it on my library
 
  • EstherLara Profile Picture
    EstherLara 10 on at
    Move a document to one library to another
    Hello,
     
    Thank you for your answer, it helped me get the ID but now my problem is that with the flow I move several documents and each one has to have a different OldID. However, when moving them to the other library, they all pass with the same ID
  • Suggested answer
    FLMike Profile Picture
    FLMike 23,258 on at
    Move a document to one library to another
    Hi,
     
    Firstly thank you so much for actually having a picture and a clear explanation, like no sarcasm at all.
     
    So the issue is, the ID is a SharePoint column and you CANNOT write into it.
     
    So in the list your want to write too, you need to add a custom column and call it like OldID and then put the ID value you brought without Get Items from the original list there.
     
    Then after you do the Create Item
    You can immediately grab the new ID created from that Action, which is now the one you want to put in your 2nd Document library.
     
    So as you loop through the Old List items, you need to create their item in the new place first, and then use the generated ID from that Action to write your files or whatever to the document library column
     
    But again, you cannot write to the ID column you will need to use a custom column to store it.
     
    If this answered your question please mark it as such.
     

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 140,719

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,355

Leaderboard