Skip to main content


Archive/move a Dossier item




  • Matthias_Walter

    Hi Dale,
    We are currently planning to extend our action builder with such actions like "copy document","move item" or "copy item". For now you might be able to use the REST API and our Http request action to achieve this.

    BR Matthias

  • Dale Zach

    That sounds great. The UI for M/365 SharePoint is so much better now that doing this manually for the time being won't be too bad but having a method to archive as part of the solution will be an excellent feature.

    I've had some limited success using PowerAutomate, but not quite there. Is there a good place to find examples using the REST API to do this? Over the years I learned to be fairly productive with the SP workflows, but still in the learning stages of these newer methods. 



  • Christof

    Hi Dale

    Check out this answer how to copy your Dossier (main item and sublist's items) to another list - even to another site collection if the user has permissions there: Copy/Duplicate list item action

    For the sublibraries documents you can copy the whole Dossier folder including the content by the Action: Copy folder

    To set the reference (lookup) on the new folder pointing to the new created Dossier (main item) and a proper folder name, just use an Update item action and update the folder. The Item Id of the folder to update you can get from the output of the Copy folder action.
    The Dossier item Id to set as reference (by default named as LookupToDossierList) is the output of the Add list item action which added the Dossier (main item) before.

  • Dale Zach

    Thanks Christof, I'm looking forward to getting this to work...

    Adding an action to the Edit form:

    I was able to easily create the Target list item.

    The copy folder is working but have a couple questions: For the Source Folder I'm rebuilding it from the { } selection button ( ie Title ), but I was wondering if there's a variable for the folder name.

    Now is where I'm stuck. Not following your instructions for setting the relationship. Is it possible to show some screen shots? Where do I get the output value?

    My last piece will be to delete the Source list item and folder. I tested using the Delete Item action. It did delete from the Edit form but got hung up because it no longer existed. Maybe a refresh command?

    It would be nice to have this on a list action, and I looked at that. Problem was the list actions don't have copy folder, since it's a list. So, doesn't look possible?

    Lastly, it would be wonderful if you included a Skybow Template with this capability in it. I'm good a copying. :)

  • Christof

    Hi Dale

    You can get the name of the referenced Dossier folder from the sublibrary by the query described here: How to easily get Dossier's related subfolder name

    This example creates the folder (if it's not existing yet) and set the reference to the Dossier item:

    Folder name - same as Initial folder name on the sublibrary placed on the form. I.e.:

    var folderName = [[Title]].substring(0, 75)+"-"+[[ID]];
    folderName = folderName.replace(/[:*"?|%#<>\\/]|^~|(_vti_)|^(?:aux|con|clock\$|nul|prn|com[1-9]|lpt[1-9]|forms)$/gi, '_');
    return folderName;

    After removing the source list items and folders use the "Open web page" action to navigate to your desired place.

    The "Copy folder" action is as well available on the List Actions:


  • Dale Zach

    I've been away from this and back to tackle again. 

    Recap: I have a Dossier Quote/Quote Documents and want to move them to an archive dossier Quote Archive/Quote Document Archive. I'm able to create the Quote Archive (header list item) and copy the related folder and content to Quote Document Archive but cannot understand how to set the LookupToQuoteArchive relationship.

    I wasn't able to follow the last instructions, sorry. I'm posting screen shots of my progress for reference. If possible, a short connect where I can share my screen would be appreciated, otherwise here's where I am:

    Working in Action Builder (in the DispForm of the Source Dossier item):

    Using the Add list item I successfully create the Target item for my Header:

    Using the Copy folder, I successfully created the Target folder and all items within:

    Now is where I'm stuck trying to setup the relationship, setting (in my case)  LookupToQuoteArchive. But my screens aren't matching your last example. This is what had been previously posted:

    To set the reference (lookup) on the new folder pointing to the new created Dossier (main item) and a proper folder name, just use an Update item action and update the folder. The Item Id of the folder to update you can get from the output of the Copy folder action.
    The Dossier item Id to set as reference (by default named as LookupToDossierList) is the output of the Add list item action which added the Dossier (main item) before.

    For my reference and understanding, looking at a Dossier I see that all items in the sub-library folder have this field set, as well as the folder. Instructions say to use the Update item action and update the folder, but I need to first get the Id from the output of the Copy folder action, and not understating how to do that. Then need to update the folder, but how do I get all items updated as well?

    I've added the Update item action next (shown here) for reference:


  • Christof

    Hi Dale,

    you don't need to get all items to update these as well - for the Dossier structure just the "LookupToQuoteArchive" lookup needs to be set on the folder.

    Use in your case the output of the previous executed actions:

    To access outputs from previous executed actions open the Expression Builder:

  • Dale Zach

    Thanks very much Christof for the additional information, I was able to get this to work.

    But now for the final piece of the puzzle I need to delete the original dossier item and can't get the Delete action to work properly. I have a Delete item action in the Edit form using the current ID, and it does delete it, then a refresh action, but after execution the form stays up, stuck saying loading... until I do an F5 on the keyboard.

  • Christof

    Don't use the "Reload" action after deletion. This tries to reload the form of the item - which is not existing anymore: 
    Better use a "Open web page" action to navigate away from that form (like the example below):

  • Dale Zach

    That works. Thanks again Christof for responding so quickly.

    Having this archiving ability is a very valuable feature that allows me to comply with our retention policies. 


Please sign in to leave a comment.