One of the questions posted recently on the SUGUK forums was, ‘How do I get my content into SharePoint and tag it to enable search, without the pain of uploading it one by one……â€
It’s a good question and one that comes up many times, otherwise, people like Quest and Metalogix wouldn’t have their migration products out in the market.
What options do we have?
Method | Pros | Cons |
Upload each item one by one | Document tagged on upload. Can ensure key columns are filled in. |
SLOW! |
Use the Multiple Upload feature | Quicker Can use Edit in Dataview to set basic metadata |
Have to revisit every document to add metadata for Managed Metadata values. |
Third Party Migration Tool | Fast way of moving lots of content into SharePoint. Generally intelligent tagging options available. |
Cost. Training and Setup time. |
Custom Upload Tool | Tailored to your requirements Business logic can be applied |
Cost Development time |
Personally, I like to use OOTB features as they don’t cost me anything, but find a way to use them that reduces the manpower overhead. And just recently I came across a little known feature to help.
Default Column Values give us a way of doing just that!
For my example, I’m going to take a Supplier Documents library, and transfer the contents of my Shared Drive where I store all that wonderful data, and place it into SharePoint. Because I had this in a Shared Drive, you can imagine that I’d tried to keep control of the documents by using a folder hierarchy. Something you’re probably familiar with I’m sure…
- F:\supplier documents
- F:\supplier documents\adobe
- F:\supplier documents\apple
- F:\supplier documents\cisco
- F:\supplier documents\Hewlett Packard
- F:\supplier documents\Microsoft
etc….
What I want to do, is move all of those documents into SharePoint, and have SharePoint automagically tag the documents with the supplier name in a managed metadata field, something we can’t do manually through the edit in datasheet view.
I’ve already created a Term set and made it available to the site, I’ve created my Supplier Documents library, and I’ve just added my top level folders by supplier to match the file share hierarchy. (I’m only going one level deep, but if you subdivided the supplier folders further, there’s nothing to stop you applying the same techniques here, Just be aware of the URL length/folder depth restrictions..)
In my library, I’ve only added a single Managed Metadata field of Supplier, but you can add more and use this same technique for those. It works with any column that let’s you specify a default value (Yes, even lookup columns!)
To apply our metadata to our hierarchy, we need to take a look in the library settings and open the Column Default Value Settings page.
This opens up a hierarchical view of your document library showing the folders that you created along with the columns that can be manipulated.
Clicking on the supplier name in the left hand tree, will allow us to change the default values for that folder. We’ll do that now and assign the relevant tag to the correct folder. Once you’ve clicked on the folder, then click on supplier in the content area to open the edit default value window.
Click use this default value, and add the correct value fr0m our metadata store for each folder.
Once we return to the top level, you’ll see that each folder has a green * next to it showing that it contains default values.
Switching back to our library view, nothing much has changed. The real magic comes when we now upload some content.
The first method we’ll use is a single upload. I’m going to browse into the Adobe folder and upload a single file into it using the add document link.
As expected, the usual add metadata window pops up, but this time with our supplier preselected as Adobe.
Excellent, Now we’ll do a multiple upload into the Cisco folder.
Click ok.
And you’ll see as we get returned to our library that all of the documents have had the Cisco supplier tag added!
And finally, that old bugbear that a lot of admins try and get users to steer clear of… Explorer view!
Back in SharePoint:
As you can see, SharePoint has automatically tagged even the documents dragged into Explorer view with our Supplier name.
Ah you say, we’ve got tons of ugly folders in our document library and “folders are bad! mm’k!†Not a problem, using explorer view, you can now take the tagged documents out of their folders and move them into the root folder of the library, keeping their nicely tagged metadata. Then just delete the folders.
How does it work?
Under the hood, SharePoint registers a synchronous event handler that applies the tags you select as you upload documents. So you’ll need to bear this in mind if you’re doing anything with the documents in your own event handlers or workflows. Also consider dragging and dropping batches of files.. SharePoint is going to trigger an event handler for EVERY one…
if you delete the folders, or remove the default values, SharePoint will unregister the event handlers automatically.
I hope this proves useful to you.
Paul.