Examining the CopyTo function in SharePoint Online

In a recent blog post on the TechCommunity site (You can read it here), Chris McNulty highlighted the improvements coming to the CopyTo and MoveTo functionality that currently exists in Document libraries  SharePoint Online. This new functionality should start dropping into targeted release tenants around the date of this post so i decided to just take a look at one aspect of Chris’s post that is already a massive improvement on any of the copy functionality that we’ve had in the past.

For those of you that haven’t seen the functionality that I’m talking about, you do need to have your libraries in the new modern mode as the CopyTo and MoveTo functionality only appears in the context menu when you right click a single document, or in the header menu when you select one or more documents in the view.

image

When you click either of these options, you’ll get a side bar panel open up on the right hand side, providing you with a number of options. Until the new functionality hits, the MoveTo option only shows you folders in the current library, so for now we’ll focus on the CopyTo function. At this stage it’s probably worth understanding the limitations of both functions and what’s happening with the next release from MS.

 

Function MoveTo CopyTo
Locations Currently limited to folders within the current library. (Changing in Targeted Release from 29/1/18)

image

Copies to any site the user has access to (including OneDrive) and powered by the MS Graph.

image

Versions Moves all versions of the item to the new location. Copies only the latest Major version to the new location
Metadata Where possible copies all metadata intact. (In it’s current form this works on all fields as the document is remaining within the same library)

Metadata columns are matched on a name basis (I haven’t tested on how this works and wether it matches on Display name or internal name)

According to the blog post linked above, if metadata cannot be copied, a remediation option will be offered to the user.

Where possible copies all metadata intact.

Metadata columns are matched on a name basis (I haven’t tested on how this works and wether it matches on Display name or internal name)

Where metadata cannot be copied it is dropped.

It’s this final row of the table that really interested me as we deal with many different types of metadata, and I really wondered how each type of metadata might perform during a document copy and what outcomes we could expect.

In order to test for this, I setup a document library with a number of columns of different data types, populated these with some data, and then copied a document between multiple libraries where each column was set to the same data type to understand how each fared. The table below shows the types and values for each column.

 

Column Name Type Value
ColumnA Single line of text Column A
ColumnB Multiple lines of text 3 lines of different text
ColumnC Number 1
ColumnD Yes/No Yes
ColumnE Person My username
ColumnF Date 1/1/2018
ColumnG Choice A (Available choices (A,B,C)
ColumnH Hyperlink Link to Google with Display Name of “Google”
ColumnJ Picture Link to a picture of a tank on Wikipedia with the display name of “Tank”
ColumnK Currency £1.00
ColumnL MMS A (from a test TermGroup/TermSet with the values A,B,C)

(I skipped Columni to avoid confusion with L and J)

Not unsurprisingly the text based fields seemed to fare the best as the following table shows.

(Edit: The table in blog format sucked! So I decided to put it up as a picture instead.)

The report table for the CopyTo metadata testing.

I haven’t fully tested every combination with this short test, but I think you’ll agree there’s a mixture of some expected results and some fairly unexpected ones too (such as the MMS values from an Integer value in a number column… That could be handy in the future!)

2 comments

1 ping

    • Jason on Fri 13 Sep 19 at 1:28 pm
    • Reply

    Helpful blog, but no matter what I do the columns do not move across, all of the managed metadata and none of it moves.

    1. Hi Jason,

      Are all of your fields Managed Metadata Fields? if so then that should certainly be supported as I was able to successfully copy these. It’s probably worth checking that there isn’t any disparity between the field names (both the display name and the internal name).

      You can view the internal name either through PowerShell, or by browsing to the list settings and then clicking on the field name. The URL will include the internal field name. Check that both lists have the same display and internal names.

Leave a Reply

Your email address will not be published.

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.