In a previous post, I dove into the scary underbelly of file repositories. Most document libraries are a hoarder’s paradise, complete with hundreds of sub-folders and thousands of files. These document libraries are 1-way streets. You can easily upload your content to them, but it is virtually impossible to go the other direction and find/retrieve files. In order to maximize usefulness and value, we need our document libraries to support 2-way traffic–file upload and easy file retrieval.
Document uploads are relatively easy. Most of our business users can figure out how to upload a document (or know someone with a few SharePoint skills that can teach them how to drag-and-drop in SharePoint 2013). Content retrieval is much harder. It relies on “advanced” features like metadata, content types, document sets and information policies to make documents find-able and retrieve-able. Unfortunately, metadata is often a tough sell. We try to convince our end-users that metadata can help them with document retrieval, but getting them to consistently apply metadata tags to the documents they upload is a nearly impossible task. Unless you’re working for a company (or industry) that requires document metadata tagging as a fundamental job requirement, your only lasting hope is to make metadata tagging simple, easy or automatic. This post walks through an everyday business scenario for document storage and outlines an out-of-the-box metadata tagging solution that was built to support it.
You’ve just been assigned as the project manager for a new software development project. Since you’ve worked on other project teams and seen firsthand the challenges of storing project documents in gargantuan file repositories, you know you want to implement a metadata tagging scheme for your project content. The goal is to tag each project document as it gets uploaded to SharePoint, and then use the metadata tags to build a browse-able document navigation tree for your SharePoint site. The challenge is figuring out how to design and use tags that reflect both the document’s purpose and the project lifecycle stage that the document pertains to.
You sit down with your SharePoint SME (subject matter expert) to find a solution to this tagging conundrum, and together you devise a graphical model of your content:
Your model breaks down all project documentation into 6 categories: project discovery, project scoping, solution building, solution testing, solution deployment and iterative change management.
Each of these 6 content categories have different information needs. Discovery and Scoping documents, for example, need to be tagged with the assigned business analyst resources that will write/finalize solution requirements. Build documents need to be tagged with code review/release dates and Test documents need to be tagged with test status and tester assignments. All content categories need to be tagged with the release/version number they apply to.
Your SharePoint SME suggests using content types to organize your metadata fields. He plans to build one content type for each of your six project categories. Each content type can present targeted metadata fields that are specific to each project category AND provide default values where applicable. And because you’d be using content types and metadata fields to tag your content, you could store all your project documents in a single document library with (gasp) no file folders! The trick is designing a quick and easy way for users to upload and tag their project documents.
We know we’re building a single document library with six custom content types. But how do we quickly and easily enable users to specify which content type their file(s) belong to? An out-of-the-box solution doesn’t cut it, because we know our users won’t go through the process of selecting their appropriate content type when they upload their files.
Your SharePoint SME goes back to the drawing board and comes up with a creative idea. How about displaying buttons on the main page of your site….and make each button a clickable link? When users click on a button, they’d be taken to the document upload page for that corresponding content type (effectively bypassing the need to select the content type of the document they are uploading). Yes, your users would still need to add in metadata that applies to their document’s content type, but we’d be able to sidestep the content type selection in its entirety. We can also plug in default column values for each content type, simplifying the metadata tagging process. Sound interesting? Let’s take a look at the steps for building this out.
Part 1: Creating your new content types
- Click on Gear > Site settings.
- Under Web Designer Galleries, click on Site content types.
- Click on the Create button.
- In the Name field, type Discovery.
- In the Select parent content type from field, select Document Content Types.
- In the Parent Content Type field, select Document. Your page should now look like this:
- Click OK.
- You will be taken to a configuration page for your new content type. Click on the Site Content Types page header to return to the Site Content Types page.
- Repeat steps 3-8 to create each of your new content types.
Part 2: Setting up your document library
- Click on Gear > Add an app.
- Select the Document Library app.
- When prompted, enter a name for your new document library.
- When you are returned to the Site Contents page, find and click on the blue icon for your new document library.
- While in your new library, click on the Library subtab and the List Settings icon.
- Click on Advanced settings and set the Allow management of content types field to Yes.
- Click OK.
- Go to the Content Types section of the page and click on the Add from existing site content types link.
- Locate the dropdown field that controls the content type groups being displayed. Change the dropdown value from All Groups to Custom Content Types. Your newly created content types will display in the Available Site Content Types box.
- Select one of your new content types and click on the Add button. Repeat this step until all your new content types have been added (as shown below).
- Click OK. You are now returned to the main list settings page.
- Go to the Content Types section of the page and click on the Change new button order and default content type hyperlink.
- Uncheck the checkbox for the Document content type and click OK. Also make sure your content types are ordered correctly. Since we want our content types to be listed in the order of our project phases, our content types appear in the following order:
- Now it’s time to create all the new columns for your document library. As you create your columns, be mindful of the new Add to all content types checkbox that now displays on your column creation page. If you leave this box checked, the column you are creating will automatically be added to each of your 6 project lifecycle content types. If you leave the box unchecked, you’ll need to manually add this new column to the individual content types where you’d like it to be used.
- Once all your columns are defined, it’s time to determine which field(s) should display for each of your content types. To get started, go to your List Settings page and click on the hyperlinked name of one of your content types.
- When the content type detail page appears, click on the Add from existing site or list columns hyperlink.
- Add the fields you want to display for this content type.
- Use the Column order link to define the order in which the content type’s fields should display.
- Click on the Settings link in your page’s breadcrumb to return to the list settings page.
- Repeat steps 16-20 to define the metadata fields for each of your other content types.
- Now it’s time to set up the default values for your metadata columns. This step requires a bit of extra work in SharePoint 2010 and SharePoint 2013. Go to your List Settings page and click on the Column default value settings link.
- To enter a default value for one of your columns, click on the column name and follow the on-screen prompts. After entering my default values, my column default value settings page now looks like this:
Part 3: Determining the upload URLs for each of your new content types
Now we need to build a custom upload URL for each of your project lifecycle content types. These are the URLs that we’ll associate with your document upload buttons. The first step in building these URLs is turning off the Minimal Download Strategy feature via your site features page. The Minimal Download Strategy feature impacts the length and character of your site’s URLs, making it harder for this solution to work.
- Go to your Site Settings page by clicking on Gear > Site Settings.
- Click on the Manage site features link under the Site Actions heading.
- Scroll down and find the Minimal Download Strategy feature. If there is a Deactivate button next to the feature, click it.
- Click on the Deactivate link to confirm you want to deactivate this feature.
Now we’re ready to build your custom upload URLs. Here are the steps you’ll need to follow:
- Go to the Library Settings page for your document library.
- Copy the URL that is displayed in the address bar of your web browser.
- Open a text-based editor on our computer (e.g. Notepad or WordPad).
- Paste your copied URL into your text editor.
- Find the word listedit in your URL and replace it with the word upload.
- Go to the end of the URL in your text editor and type &Source=
- After the &Source= string, paste in the URL for the home page of your SharePoint site.
- Go to the end of the URL in your text editor and type &ContentTypeID=
- Return to the Library Settings page for your document library and click on the name of your first content type.
- Look at the URL for your page and find the string &ctype=
- Place your cursor in the URL and copy the entire string of characters that follows the &ctype= string. This is the unique ID for your content type.
- Return to your text editor and paste your content type ID after the string &ContentTypeID=
That’s it! You’ve now built a custom upload URL for your first content type. Here’s a picture of the end result. All the parts of the URL I customized are shaded in yellow:
- Now it’s time to test. Copy your newly built URL and paste it an Internet browser window. Validate that you can upload a document, have it auto-tagged with its corresponding content type and that all your default column values work as expected. If the link does not work as expected, re-build your custom upload URL to make sure it is working correctly.
- Repeat steps 1-13 for EACH content type in your document library. In the end, you’ll end up with a unique upload URL for each content type.
Part 4: Creating your upload images
Now it’s time to build the images you want to use as your document upload buttons. Feel free to create the buttons in whatever program or design you like—just make sure that you end up with 1 image file for each upload button.
I opted to create the following circle images in PowerPoint. I right-clicked on each image in PowerPoint and selected Save as Picture to save each circle as a separate .PNG file.
Part 5: Adding upload buttons to your site’s home page
There are thousands of ways you can lay out and style your site’s home page. The steps below provide one suggested way of laying out your upload buttons. Feel free to customize.
- Go to your site’s home page.
- Click on the Edit link in the upper right-hand corner of the page.
- Click on the Text Layout button in your Format Text subtab and choose the One column with sidebar option.
- Place your cursor at the top of your page’s sidebar. Select the Heading 1 style from the Format Text subtab and type Upload Center on your page.
- Hit the Enter key and type Click on a circle to upload a document. Your sidebar should now look like this:
- Hit Enter again.
- Click on the Insert subtab and then the Table button. Add a table with 3 columns and 2 rows.
- Place your cursor in the left-cell of the upper row. You’re now ready to insert your first image.
- Click on the Insert subtab. If your images are already uploaded to your SharePoint site, select Picture > From SharePoint and select your first image. If your images are not uploaded to SharePoint yet, select Picture > From Computer and select your first image.
- Your image will now be displayed in your table cell. If you want to resize your image, change the Horizontal Size and Vertical Size settings on the Image subtab. Since my images were a bit large, I’ve resized them down to 100×100 pixels.
- Now it’s time to add the upload link to your image. Click on your image to select it. Then click on the Insert subtab and select Link > From Address.
- Copy the upload URL you created for this content type and paste it into the Address box of the Insert Hyperlink dialog box.
- Click OK to save your changes.
- Click on the Page subtab and click on the Save button to save your page.
- Now it’s time to test! Click on your first upload button and validate that you can successfully upload a document. Validate that the document gets auto-tagged with its corresponding content type and that all your default column values work as expected. If the link does not work as expected, re-build your custom upload URL to make sure it is working correctly.
- Repeat steps 9-15 to upload your remaining images and link them to your custom upload URLs.
- If you’d like to remove the gridlines from displaying around your table cells, edit your page, go to your Design subtab, click on Styles and select the Table Style 1 – Clear option.
Here is my page now:
Part 6: Building your document library views and navigation
You’ve now built an easy way for users to upload documents and have them auto-tagged with metadata. Now you need to consider how your users will browse for and find documents that have been uploaded. Will you build out views for each of your content types? If so, how will your users access these views?
I recommend creating new views and adding them as links on your site’s Quick Launch bar. The results may look like the example highlighted in yellow below. Of course, you can get more detailed and elegant in building out these document library views. The important thing is to provide your end-users with easy-to-click-on links that provide a queried short list of documents that meet their specific information need.
A big thank you to Matthew Ruderman (SP_Geek) for serving as a technical editor on this post. Without you, Matt, these manually generated upload links would have looked awfully ugly…