Harness SharePoint Library and Folder Default Views to build more appealing solutions

Article Index

1. Introduction

Why use different default views based on navigation hierarchy?

What are the different levels that a default view can be set?

Caution: Per-location view defaults

2. Library default views

3. Folder default views

4. Custom Folder default views

5. Document Set (and Custom Document Set) default views

1. Introduction

This article describes the different methods and techniques available for configuring default views at different hierarchy levels (folder levels) within a SharePoint library. This article presents the options and how to implement them in SharePoint 2013. All options/settings discussed also apply to SharePoint 2010.

Why use different default views based on navigation hierarchy?

People use libraries for many different purposes. If you are storing different types of documents in a library (especially if you are using different content types) the properties (or columns) of information may be specific to the different types of items in your library. Allowing the default view to be set at different levels in the navigation hierarchy means that you can show the user views that are specifically customized for showing the data in that location.

This is really where all the action is at. We’re talking about what happens when the user navigates either from the root level of a library into a folder, or from a folder into a lower level folder. Usually we group items in folders for some logical reason, and based on that logic it is reasonable to expect that we might want to show a different view of the items in that folder.

We actually have a few options available to us at this level depending on the types of folders that have been implemented. Let me bore you with some details about folders that may assist with some of the terminology used through the rest of this article.

Folders are a content type in SharePoint. Through the SharePoint UI you can create your own custom content types that are based on the folder content type (I’ll refer to these as custom folder content types, or just Custom Folders). Then there’s Document Sets which are based on the folder content type (just like a custom folder content type) but contain a lot of extra intelligence that SharePoint gives you out of the box. In the same way you can create custom folders by extending the base Folder content type, you can also create your own Custom Document Set content types by extending the standard Document Set content type.

The techniques for applying a default view to a folder is different for Folders, Custom Folders, and Document Sets, so we will discuss them one at a time.

What are the different levels that a default view can be set?

Library (top level)

Folder

Custom Folder

Document Set

Custom Document Set

This article will go through each of these different navigation hierarchy levels and explain with examples how default views can be applied and what it looks like.

Caution: Per-location view defaults

SharePoint also has the concept of “per-location view defaults” which is part of the Metadata Navigation and Filtering feature. On the surface it seems that there is a big overlap between setting default at the different hierarchy levels (as I will discuss in this article) and the per-location view defaults (which claim to let you specify a default view to use at any level in the hierarchy). In reality the per-location defaults do not affect the default views used as a user navigates between folders. These per-location view default only apply if you select to open the location via the Metadata Navigation tree. This method has some fairly major caveats and I’d advise caution when using it to implement folder level view defaults. If you want to know more about this option please read SharePoint per-location view settings (capabilities, limitations & pitfalls)

2. Library default views

This one is as simple as it gets. Every list or library in SharePoint contains one or more views. One of those views can be set as the default. You do this directly on the view settings page.

Open the library and select Library Settings

image

Scroll down to the Views section, where you can see all views for the library and also which view is currently set as the default.

image

To change the default view, click the name of the view you want set as the new default. This will open the view settings page. Now tick the ‘Make this the default view’ checkbox.

image

Save the changes and now navigate to the library in SharePoint and this time your selected view is displayed by default.

image

3. Folder default views

When to use it

Use this method when you want to show one view in the root of the library (when not in any folder), and a different view when inside any folder within the library.

What it looks like

In this example I’ve added 3 columns to a standard Document Library (Project, Project Manager, Document Type)

image

In my library I have only folders at the root level of my library (no documents stored at this level) so I just want columns for the title of the folder.

image

When I go into any of the folders I want to see a different default view which shows me documents grouped by Project and also shows the Project Manager and Document Type.

image

How to implement it

Ensure content type management is enabled for the library. This is under Library Settings | Advanced Settings.

image

Create a view to use at the root (top-level) of the library, selecting the desired columns, sort order, etc. I’ve called mine ‘Library View’. The important steps here are to:

1 – Set this view as the default view

image

2 – Expand the Folders setting option and select ‘Show in this view: In the top-level folder’. Note: these options only become available once you have enabled management of content types in the library.

image

Now save the view and the library view settings should look similar to this:

image

Notice that Library View is designated to only show in Top-level and is set as the default view for the library.

Now create another view that you want to use to display documents when inside folders. Again create the view and setup the desired column, grouping, sort order etc. I’ve called mine ‘By Project’. Important steps here are:

1 – Set this view as the default view. Yes I agree this doesn’t seem right. You would expect this to replace the ‘Library View’ as the default view – but in combination with the ‘Folders: Show in’ option some unexpected magic happens! Read on.

image

2 – Expand the Folders setting option and select ‘Show in this view: In folders of content type [Folder]’

image

Now save the view and take a look at the view settings for the library.

image

SharePoint has allowed us to have 2 default views! The show in column tells us that the ‘Library View’ view is the default for the Top-level (or root) of the library and the ‘By Project’ view is the default when in any Folder.

That’s it – when you now navigate to the library you will see the ‘Library View’ and then clicking to navigate inside a folder will automatically switch to the ‘By Project View’.

I was interested to see what would happen if I created another view at the “Show in folder” level and tried to set it as the default. I created a view called ‘By Manager’ and set it as default.

image

As you can see SharePoint is enforcing that I can only have 1 default view at the folder level and this is independent of the default view at the Top-level.

4. Custom Folder default views

When to use it

Use this method when you want to be able to specify a default view at the root level of the library, and a different default view for each type of custom folder. Your intended design might not use custom folders, but consider using them so that you can use the different custom folder types to assign different default views.

What it looks like

I have created a library to hold employee timesheets and expense claims. Timesheets and Expenses are two separate content types that I have created. I want to create a folder per project in the library, and within each project I’ll create an Expenses folder and a Timesheet folder to store the actual documents. Since Expenses and Timesheets contain different columns I want a specific default view when browsing inside Expense folders and a different default view when browsing in Timesheet folders.

image

With the use of custom folder content types I can have a default view at the library level showing detailed folder information (as shown below)

image

Then the default view is changed when browsing into any of the Timesheet folders to present Timesheet specific information (such as Week Start Date, Employee Name and Total Hours) in a nice friendly format.

image

A different default view is used when browsing into any of the Expense folders so you can quickly see Expense specific information such as the Total Amount of the expense.

image

How to implement it

Ensure content type management is enabled for the library. This is under Library Settings | Advanced Settings.

image

Before configuring the library we need to create some custom folder content types that we will use in the library. Management of content types is done at the site level (Site settings | Site Content types)

image

Create a new content type for the custom Timesheet Folder, setting the parent content type to ‘Folder’.

image

Save the new content type, then add the existing Comments site column to this content type

image

Select the Comments column so that our content type now has these columns

image

Create a second custom folder content type for the Expenses Folder, setting the parent content type to ‘Folder’.

image

As with the Timesheets Folder content type, go ahead and add the Comments column

image

Now in the library settings we need to add the two new custom folder content types

image

Select the Timesheet Folder content type and the Expenses Folder content type

image

Your library setting should look similar to this

image

Now we need to create the view we want to use as default when browsing in Timesheet folders

image

Similarly we need a default view to use for showing Expenses

image

To get the default view applying to folders based on the custom content type of the folder, we go into the view settings for the view you want to make a default. So let’s start with the Timesheets by Week view.

Check the ‘Make this the default view’ checkbox

image

Expand the Folders setting option and select ‘Show in this view: In folders of content type: Timesheets Folder’

image

Then edit the Expenses by Project view. Check the ‘Make this the default view’ checkbox

image

Expand the Folders setting option and select ‘Show in this view: In folders of content type: Expenses Folder’

image

After making these changes the Views section of the library settings should be similar to this

image

Notice the All Documents view is set to Show In All. In this state you will find that the All Documents view will be the default (even within Timesheet and Expenses folders). We need to change the All Documents view so that it only used as the default at the top level.

Edit the All Documents view, expand the Folders setting option and select ‘Show in this view: In the top-level folder’. The View settings should now look like this.

image

Enough configuration, let’s start populating the library now. First we will setup the folder structure.

At the top level of the library we create Project folders using the regular Folder content type

image

image

Within each of these project folders, we create one Timesheets folder (using the Timesheet Folder content type) and one Expenses folder (using the Expenses Folder content type)

image

Inside the Project ABC folder, I now have these 2 folders.

image

Browsing to these folders now you should find that the default view is changing automatically as you navigate.

Library root/project subfolders (use All Documents view)

image

Expense Folders (use Expenses by Project view)

image

Timesheet Folders (use Timesheets by Week view)

image

5. Document Set (and Custom Document Set) default views

When to use it

Use this method when you are using Document Sets in your library and you want one view at the root level of the library and a different view when you are viewing the contents of a Document Set. The same default view will be used for all instances of the Document Set within the library. If you have multiple different Custom Document Set content types in the library, you can specify a different default view for each of the different Custom Document Sets.

What it looks like

When browsing the root level (top level) of the library the All Documents view is used by default

image

Navigating into any document set switches the default view so that we can present the document properties in a better way.

image

In the case of multiple Document Set content types you can have a default view at the top-level (customized for showing information about the document sets) then have a different default view for each of the different document set content types. In the following example I have a library with 2 custom document sets (Small Project Document Set and Large Project Document Set).

The default library view shows a list of all document sets (includes both Small Project and Large Projects) and exposes specific document set properties as columns and groups by Project Status

image

When navigating into the first project (which is an instance of the Small Project Document Set) I get a default view customized for small projects

image

When navigating into the second project (which is an instance of the Large Project Document Set) I get a default view customized for large projects

image

How to implement it

Ensure content type management is enabled for the library. This is under Library Settings | Advanced Settings.

image

From Library Settings click Add from existing site content types

SNAGHTML1e60fc2

Add the Document Set content type

image

Once you’ve created your document sets (at least a few to start with), configure the All Documents view to display document set information that you want to see.

Next create a new view to use when showing the content of a document set (I called mine Document Set View)

image

Select Library Settings | Content Types | Document Set

image

Then select Document Set settings

image

Now use the Welcome Page View option to select your new view to show content within Document Sets

image

We are done, navigating into a document set should now use this view by default.

If you are using multiple custom document set content type, simply repeat the steps to assign Welcome Page View to each of the content types.

Further Reading

https://www.nothingbutsharepoint.com/sites/eusp/pages/automatically-switching-views-when-opening-a-sharepoint-folder.aspx

http://office.microsoft.com/en-001/sharepoint-server-help/configure-the-availability-of-views-for-a-location-in-the-site-hierarchy-HA010378684.aspx

http://sharepointpromag.com/sharepoint-administration/implementing-folder-content-types

134 thoughts on “Harness SharePoint Library and Folder Default Views to build more appealing solutions

Add yours

    1. You’re welcome. I had to go through the pain to uncover all possible scenarios (to support them in product development of OnePlaceMail). I figured it’s a pain others can do without!

      Like

  1. Great stuff. I have a question about custom folder default views. I have four folders in my library, but I only need a different view for one of them. I can create a folder content type as you suggest, but I only need this folder created once. Now I am stuck with a folder content type that my not so savvy users see every time they want to create a new document. This redundant option will either confuse them, or worse cause the creation of numerous unwanted folders and scattering of information. Yes – proper training is key to everything, but is there any way to do this without having the option to create more folders of the new content type?

    Like

    1. Thanks Elie, I’m glad it helped you out. In regards to your question of preventing users from creating new folders based on your custom folder content type I think you should be able to go to Library Settings, under Content Types you can see in the table which content types are available on the New Button. Click the “Change new button order and default content type” link, now uncheck the “Visible” checkbox next to the folder content type which you don’t want users to create any more of. That’s it you should now have the folder content type removed from under the New button options for users in SharePoint. If you need to create another one of these folders you can come in, make it visible again, create your new folder then hide it again.

      Like

  2. Great information! How do you get to the Welcome Page View? When I click on Document Sets, I see Welcome Page Columns and Welcome Page, but there is not Welcome Page View. I checked this on SharePoint 2013 July 2014 CU and Office 365.

    Like

    1. I just did a quick check on an Office 365 tenant and the option is still there. I can’t remember any scenarios that I’ve not seen this option appear. Possibly the Site Template used could be a factor. Anyone else seen this before where the Welcome Page View option is missing?

      Like

  3. Great article Cameron – thank you for the write up. Either I’m not getting it, or there isn’t an effective way to get at what I’m after.

    Here’s the setup.

    SiteCollection (top)
    Project Mgmt (subsite)
    Project Mgmt (default doc lib)
    Project X (folder in root of doc lib)
    Project X Plan (folder in project X)
    plan.mpp
    book1.xlsx
    Project X Design (folder in project X)
    word.docx
    map.vsd
    Project X Develop (folder in project X)
    file1.xml
    file2.cmd
    Project Y (folder in root of doc lib)
    Project Y Plan (folder in project Y)
    plan.mpp
    book1.xlsx
    Project Y Design (folder in project Y)
    word.docx
    map.vsd
    Project Y Develop (folder in project Y)
    file1.xml
    file2.cmd

    This makes for quick viewing of all project docs in a traditional explorer view when syncing/mapping via OneDrive for Business in O365. Why not sub-sites? If each Project is a sub-site of Project Mgmt site, then browsing folders / quickly accessing & editing project docs would be less efficient.

    Connecting a MS Project file to a SharePoint task lists is handy for running a project. This requires a task list for each MS project file. Easy enough.

    The goal is to have one page for each project including the Task List timeline with tasks, and the “Project X” folder.

    Some would say, create a “project” sub-site template. Great, except that the efficient folder hierarchy goes out the window.

    What about a project site page template with web parts including Project X’s mpp connected task list and a filtered view of the top level doc library? Sort of nice… but there are two problems here. 1) Site pages don’t include lists, so the project site page setup isn’t as simple as “template” redeployment and includes several steps to setup each project. e.g. create site page, create mpp connected task list, create view of task list, create view of doc library, etc. yuck!! 2) The real show stopper here is that filtered views don’t work (at least the way I’m trying to use them). I can get the top level to display Project X, but then the filter prevents seeing anything under that unless the name “Project X” is in the name of the item. (thinking this is where content types / document sets may help?)

    It seems back the SP 2010 days, with design view in SP Designer – several folks where able to create a data source view to accomplish what I’m after, however I’ve been unsuccessful at getting this to work in 2013 O365.

    In summary, I’d like to display a sub-folder and everything below it (without seeing the parent / siblings) from a site page or subsite.

    Thx for taking the time Cameron –

    Tyler

    Like

    1. Interesting scenario. I don’t think I have the exact answer you’re looking for. Creating a custom “Project” Document Set would bring a lot of nice things to the table for you:
      * Each document set automatically has a welcome page (that you can add web parts to) – this would give you a landing page to try and dynamically show the tasks on
      * Document sets can also automatically create default content which may help keep your folder structures and any base files consistent and automated for new projects

      The issue still remains with bringing your Tasks and Documents together. Under this approach the challenge is getting the correct task list to show on the Document Set Welcome page. You can add web parts to the document set welcome page but this drives ALL instances of document sets. I don’t think it’s possible to add a different webpart (e.g. Project A Tasks List) onto Document Set A and (Project B Task List) onto Document Set B. You would need to find a way to add just a single webpart onto the Document Set Welcome page design and somehow dynamically pull through tasks associated with the current document set.

      I hope this helps.

      Like

  4. Hi,
    Great article, and thank you. What type of permission do I need to have to see the “In folder of content type” drop down option? I am trying to build a library top level view and separate views for each folder within my library. I also want to build multiple views within my folders. Currently my “in folder of content type” drop down option is greyed out. Thanks Cameron

    Like

    1. Hi,

      Things to check that come to mind:
      – Ensure that you have content types enabled in the library
      – Ensure you have added at least one folder content type (other than the generic standard folder you get by default)

      Let me know you get on.

      Like

  5. Hi

    Very good documentation. We use 3 levels, toplevel with a grouped by, second level default view for contenttype “CustomerFolder” (a folder content type, needed to set metadata on the documents in this folder) and last level a view with the documents.
    Thanks Cameron.

    Like

  6. hello, Thank you so much for this article, i have used two levels of the view, the top level and the in folder view but on the top level i cannot edit the fields because it is read only even in data sheet view, is there anyway to make this editable

    Like

    1. Hi, can you please try to explain the issue a bit more? I wasn’t sure what it was that you were trying to edit. Are you in the library settings but some settings are disabled or are you trying to edit the fields associated to content (documents/files) within the library?

      Like

      1. thanks for your response. I cannot edit the fields within the document library on the top level folder but i can edit when i go into the folder to access the individual files. This is associated with content. I hope i am clear enough

        Like

      2. Thanks for posting the screenshot on Facebook, I found it and think I understand. I don’t think you can edit custom folder type properties in a view and the behaviour you are seeing is normal. I agree it would be nice if it allowed for it. Someone might have a work-around, please let us know if you do?

        Here’s some other pages that provide more explanation:
        http://social.technet.microsoft.com/Forums/sharepoint/en-US/5b8a67a1-ae5a-4525-b43e-4477b02a83fe/editing-folders-in-a-datasheet-view
        http://blogbaris.blogspot.com.au/2011/11/sharepoint-datasheet-view-selected.html

        Like

  7. Cameron, big ups for the info.
    Just a question, when I do the above on a doc lib, it works fine. As soon as I create a subsite on this site, and add the content types to it, the views don’t appear. Do I need to re-create all views per subsite? Or is there another way?

    Cheers.

    Like

    1. Hi Christophe. Configuration of the default views lives with the Library not the content types. As each library can have it’s own views there’s no saying that when taking a content type and adding it to another library, that the other library will have the same views available. The easiest way to take a whole library configuration (including content types, views, default views etc) and add it to a subsite is to go to the configured library and then in library settings you get the option to save the library as a template. You can then go to the subsite and create a new library based off this template (instead of the usual Document Library).

      Like

  8. Hi Cameron,

    Thanks for this great post.

    Unfortunately I can’t get it to work properly (#4, views with custom folder content types). I created two custom content types “Internal Documents” and “External Documents”, both based on the Folder content type. I added these two content types in the library and created one item of each type. Then I created all three views: top-level view showing all files (displays all items without folders), internal documents view (displays all items inside this content type), and external documents view (displays all items inside this content type). I also made all three default views and selected the correct content type under “Show in this view: In folders of content type:”.

    The top-level view works just fine. But I am not able to switch to either of the other views. When I click on the view names nothing happens.

    Do you have any idea how to solve my problem?

    Cheers,
    Katrin

    Like

    1. Hi Katrin,

      I think there is a bug in SharePoint that you might be hitting. When you are at the top level of the library that it will show you all the views (including the 2 views that you are using as your default inside your Internal Documents and External Documents content types). Although it shows the views at the top level, if you select them it just does nothing. Does it automatically switch to the Internal Documents view when you navigate into the Internal Documents folder?

      Like

      1. Yes, the Internal Documents view is opened when I navigate into the same-named folder (the same applies to the External Documents folder and view). I just noticed that I also can’t open the top-level “All Documents” view when I am in one of the folders.

        I think this is very annoying and might confuse the users. I was so hoping to find an alternative to two separate libraries for internal and external documents (as I want to have different permission settings for both kinds of files). But is seems I can’t get around them…

        Like

      2. I agree, the bug with the views showing at the top level is annoying. The problem with selecting the All Documents view from one of the subfolders, try checking that the All Documents view is set to show in All Folders instead of Top-Level.

        Like

  9. I have found that, you have to go to document set settings page through document library settings page If you go to document set content type from site settings you will not see it.

    Like

    1. Hi asadrefai, any chance you could share your csom script for doing the above? Just trying to work that out myself!

      Thanks

      Like

  10. Your instructions are so easy to read and follow. Very helpful.

    I’m trying to change the content type of an existing folder in SharePoint 2013. I’ve already created the new content type based on the Folder Content Type and added it to the Library Settings. But how do I change the existing content type of a folder in that library to the new/custom folder content type?

    Any info you can provide on this would be awesome. Thanks!

    Like

    1. You should just be able to view the existing folder properties, click edit, and there will be a ‘Content Type’ column to select from the available content types. Are you able to change to your new content type using this method?

      Like

  11. Hi Cameron, this was a very helpful article thank you. I found the example and steps with “Custom Folders” and column views especially useful.

    However it ended up highlighting a key difference between the Sharepoint Online version and the Sharepoint Server version.

    This makes the Sharepoint Online functionality very limiting for me. Unless there is a way around it. I found the difference when I followed your steps and had unexpected behavior of not being able to restrict the meta data (columns) view at the relevant level within folders. The names of each view appear at at every folder level including the top folder level rather than being specific to the folder (or sub folders) to which it is relevant. This almost makes it cluttered, out of context and non-intuitive for non administrator users, especially if there are several views for a site.

    Your “further reading article” http://office.microsoft.com/en-001/sharepoint-server-help/configure-the-availability-of-views-for-a-location-in-the-site-hierarchy-HA010378684.aspx shows how this is possible in the server version. This is actually what I was trying to achieve which led me to your article and try setting this up in the first place.

    Do you know a way to achieve the functionality that is described in this article on Sharepoint Server 2010 for setting views according to hierarchy in the Sharepoint Online version?

    Thanks

    David

    Like

    1. Hi David. By using the “show this view in” option available in the view settings you can achieve hiding of views from the top level, and if you are using custom folder content types you can make certain views only available in those types of folders. Take a close look at these settings:
      View settings
      By not including the view at the top level and only in specific folder content types you may be able to achieve the result you are after. I checked this in Office 365 (SharePoint Online) and in the example above I only saw one view available in the Expenses Folder and only one (different) view at the root level of the library.

      The per-location view settings are available in SharePoint Online (Office 365), it may just be you need to activate a feature for the option to show up. I cover this in another article that would be worth reading as it highlights some pitfalls of heading down the route of using the per location views approach.
      https://camerondwyer.wordpress.com/2013/12/04/sharepoint-per-location-view-defaults-capabilities-limitations-pitfalls/

      Good luck.

      Like

      1. Hi Cameron, thanks for that explanation and the link.

        These excellent functionality possibilities with severe limitations that are only established after hours of googling and tweaking are very frustrating.

        I have tried out your suggestion again by recreating it (as it was the way I had set it up before), Despite selecting the view “In folders of content type” and selecting the relevant custom folder I am still seeing the view in the folder and at the top level and all levels in between.

        Not sure what’s going on. Am going to try and start again from scratch and see if it changes anything. Any other suggestions would be gratefully received.

        Regards

        David

        Like

      2. Hi David,

        It is indeed frustrating. I’ve gone back into Office 365 this afternoon and I’m now seeing similar behaviour to what you are describing. I get the view names showing (at the root level of the library) when they shouldn’t be. Additionally, if I select the name of the view that shouldn’t be showing I can’t switch to the view it just leaves me at whatever view I’m currently at. It’s as if it knows I shouldn’t be able to get to the view at the current level but it’s showing the name of the view incorrectly.

        Please post back here if you make any progress on this issue as I’d be interested to see if it’s something we can fix or if it requires a Microsoft fix.

        Like

      3. Hi Cameron, thanks for your reply below (cant seem to reply to it so am replying here). I haven’t had any luck. Am waiting for a microsoft support call on the subject. Will let you know if I make any progress. Likewise if you do, would appreciate your comments.

        Cheers

        David

        Like

      4. Hi again Cameron.

        I am yet to hear back from Microsoft support. However in the meantime I think there are two problems with views and custom folders. The first one I think is a bug. The second may as well be a bug but maybe simply how the functionality works which if so is plain dumb, clumbsy, cluttered and confusing for users and should be fixed.

        Seems OnePlace is a Microsoft Gold partner, are the problems with this which have been articulated in this blog and your experience with views by hierarchy location as set out in the other blog https://camerondwyer.wordpress.com/2013/12/04/sharepoint-per-location-view-defaults-capabilities-limitations-pitfalls/ something which is worthwhile you following up directly with Microsoft Office 365?

        Re these issues :

        1. The first issue which I think is a bug is the Library Settings>Views>View>Edit View – “Make this default view” (Applies to public views only). One would expect that when this is set to default view and when the folder settings is set to “Show this view>In folders of content type : Custom Folder Name” that when the user navigates to that folder, it is automatically the default view for the folder. Its not. Its the first default view in the Library Settings>Views.

        2. The second issue which may as well be a bug is that all the Views listed in the Library settings Views section show up at all folder levels in the library. This is despite the fact the view has been set to the the third option “In folders of content type : Customer Folder Name” and not “In all folders” and not “In the top level folder”.

        This functionality to me seems so fundamental to what Sharepoint online libraries are all about (getting rid of folders, moving to metadata, having so many metadata column options, having managed metadata” that they may as well not deploy it at all.

        A workaround approach I have found that might help get rid of the confusion would be to use script to hide the Folders views altogether from the library. If the default view would work when navigating between folders then this would be reasonable work around. An example of doing this is found at this link :

        http://davidlozzi.com/2014/10/28/sharepoint-hiding-ribbon-and-more-with-isdlg/.

        See the last example “and let’s go crazy and hide that pesky view and search bar” for the script and “tada” for a screen shot with the views and other preceding examples removed from the page.

        Only thing is I am not yet familiar with how to set up scripts in sharepoint online. Seems as problematic as getting this basic functionality working.

        So as this is so fundamental to sharepoint’s functionality and does not work as expected is this something you would be prepared to take up with Microsoft as a gold partner working in the space?

        Cheers

        David

        Like

      5. I believe this is the same approach as I’ve outlined by using custom folder content types. I’ve walked through how to set it up through the SharePoint UI. The linked article is talking about properties you can set on a view so I’m assuming they are defining views declaratively in XML (you do this if you roll out your library and views as a feature in SharePoint) but I think the end result would be the same.

        Like

      6. Cameron,

        You will be impressed by this. A senior Microsoft USA technical support just came back to me after researching this problem with default folders and views over the last 24 hours. Guess what? They have referenced your blog and say they have tested it and it works :

        “What you are requesting is possible, but it’s quite a bit of work and custom configurations. We have tested this way and verified it works, but it only works in the Meta Data Tree (to the left), not in the folder view (on the right). So if you are okay with using the left hand navigation (similar to file explorer) to hit each folder then you can achieve what you were looking for. But if the users start clicking folders in the right viewing pane it will take them back its default view structure.

        Here is the article referencing this: https://camerondwyer.wordpress.com/2013/12/04/sharepoint-per-location-view-defaults-capabilities-limitations-pitfalls/

        At the bottom of the article above another option that is more in depth is listed. You can welcome to give this a try but we haven’t tested this.

        Here is the article: https://camerondwyer.wordpress.com/2014/01/06/harness-sharepoint-default-views-at-different-navigation-hierarchy-levels-to-build-more-appealing-solutions/

        So I think it is worthwhile raising the issue with them about folders views as a Gold Microsoft partner, if you were willing to to that. I would also be interested in whether there is something in these articles which could be applied :

        http://charliedigital.com/2012/06/14/working-with-folder-specific-views-in-sharepoint-lists/

        or hiding the view from the page if the default view could be got working per this site :

        http://davidlozzi.com/2014/10/28/sharepoint-hiding-ribbon-and-more-with-isdlg/.

        Hope this all proves to be helpful in the end.

        Regards

        David

        Like

  12. Hi!

    Thank you for the information!

    I am trying to do the same but in a List. Is there any way that if you modify the view of the list in one Sub-folder the original list on the root modify by itself?

    Thank you!

    Like

    1. Hi, the same view capabilities should be available on a list (just make sure you have enabled content types in the list). Changing a view in a list should change it for every subfolder and the root level. The view is only defined so every folder it appears in should be consistent. Are you seeing something different.

      Like

  13. The answer to my endless circle of research…. If only I had found your article sooner I wouldn’t have wasted time already spent. Thank you sooo much.

    Like

  14. Great! Thank you so much for this Information! This saved me a lot of time and showed me a new perspective on how to open up the quite rigid GUI of SharePoint!

    Like

  15. Cameron, David,
    I experienced the same problem/bug as you, i.e. all the views were listed both in top level folder and in custom folder. However, I can make it work temporarily every time if I open Change Content Type page in one IE tab and Library in other tab.
    Then if I open and save one content tipe column that’s involved in these views and switch to IE tab with Library and press F5 (refresh), views are displayed correctly. However, if I wait 5 seconds and press F5 again, all views are displayed again.

    Maybe you can reproduce it and it gives you more clue, how to make it working permanently.

    Liked by 1 person

  16. Hi,

    This is a great article that I’ve been looking for ages. My only issue I’m having is the following. I have a document library with 4 top level folders (Internal Docs, Public Docs, Marketing and Restricted Docs). I’ve successfully set the different views for the sub folders following your guide however the issue I’m having is that when I create a column (to then add to the specific folder view) and make it required to contain information, it applies it to all of the folders (I’m guessing this is because the check box for “apply to all content types” is ticked). I’ve tried unchecking the option to apply the column to all content types however I can’t then go to the specific folder (or folder content type) and then specifically apply it to that folder, so what happens is when a user uploads a document, it remains in a checked out state because a required field isn’t populated however the required field doesn’t apply to them. Is the only option to make all columns be optional and not required to contain information?

    Like

    1. One solution would be to create 2 document content types that both include the column. Set one of the content types to have the column as mandatory and the other to have the column as optional. Now you should be able to go into the library and change the New Button Order on your 4 top level folders to determine which of the 2 document content types is available under that folder.

      While not exactly what you are after I did a quick search and this article might point you in the right direction http://www.sharepointnadeem.com/2014/11/sharepoint-limit-folder-content-types.html

      Let me know how you get on.

      Like

  17. Cameron,

    +1 on the great article.

    I understand I can allow Folder Content Type to a Document Set. However, can I add a Folder Content Type to the Default Content of the Document Set?

    Liked by 1 person

    1. Thanks J. I don’t think you can add a folder content type to the default content of a document set. You can add default content (i.e. files), and you can specify a path for the default file that includes a folder path (e.g. /mynewfolder/defaultfile.docx and SharePoint will create the mynewfolder automatically so that it can create the defaultfile.docx. BUT the folder is created as a standard folder and I don’t know of a way to change this behaviour.

      Like

  18. Hi,

    great Post, helped me very much, but I have a question.

    It seems that this won’t work if you don’t open the Library. If I navigate through the Library without opening it, it shows the standardview on all folders, including that one i,ve changed. Do you have any idea how to solve this?

    Greets, Jonas

    Like

  19. I think I’ve run into a situation similar to the one David had last September – the view that’s set to be the default inside my custom folders simply doesn’t show up inside the folders, either as an option or as the active view. Have you come across this? I’ve used your article before to remind me of how to create the default views for folder and at the root and it’s always worked. What is different in this situation is that I’m using a custom folder content type, and I’m building multiple libraries from a template. I created the two views (root and folder specific) in the library that the list template is made from, and the views work in that library, but with libraries made from the template, they don’t work, and I cannot recreate them either.

    Like

  20. I think I’ve run into a situation similar to the one David had last September – the view that’s set to be the default inside my custom folders simply doesn’t show up inside the folders, either as an option or as the active view. Have you come across this? I’ve used your article before to remind me of how to create the default views for folder and at the root and it’s always worked. What is different in this situation is that I’m using a custom folder content type, and I’m building multiple libraries from a template. I created the two views (root and folder specific) in the library that the list template is made from, and the views work in that library, but with libraries made from the template, they don’t work, and I cannot recreate them either.

    Liked by 1 person

    1. Interesting scenario. I haven’t run into this one before. From your description it sounds the problem may be in the templating of the library. The new library instances created from the template just aren’t ended up with the same configuration as the original. In order to figure out what is missing or getting set incorrectly I’d start by using a tool like SPManager (on-prem only) or SharePoint Client Browser (will work with Office 365) and play a bit of spot the difference to see what’s different in the library created from the template.

      Liked by 2 people

  21. Que buenisimo… I was about to quit trying to set one view at top level of library and other view at folder level, reading your article helped me to do this. Thanks a lot. I’ll set your blog as one of my favourites.

    Liked by 1 person

  22. I don’t suppose you tried this in the modern document library interface? I’m in a situation where all I would like to do is change the top level view to a generic folder view, and then everything inside the folders to a more specific/custom view. I can apply two default views, but the view associated with “In folders of Content Type: Folder” never gets applied. In this case the top level view is applied throughout even though the column for “Show In” indicates that it is only being applied to the top level.

    My guess is that this feature is simply not supported in the new UI.

    Liked by 2 people

  23. Dear Cameron,

    An excellent post, we needed this one! But unfortunately this doesn’t work in the modern document libraries. We can switch back to the classic view, but everybody is used to work with the new experience already.
    Any idea how we can fix this? I see a post in december that somebody has the same issue.
    Please let there be a solution! 🙂

    Liked by 1 person

      1. Hi Stephanie. I haven’t had a chance to revisit this under the Modern UI. Recent months have seen more and more attention given to Libraries in the Modern UI to close the gap between functionality that was available with the Classic UI. I still don’t believe view at a folder level is available yet.

        Like

      2. I can confirm that it still can’t be done in modern view (september 2018). Only classic view works. Hope Microsoft will look at it because it’s very nice feature.

        Liked by 1 person

  24. Very good outline of how to manage the views with document sets and content types, just what I needed today to fix the views for our Legal team. Much appreciated.

    Liked by 1 person

  25. Really well written article, but unfortunately it seems we will never get this with Modern libraries. It has been over a year and MS still have not given us this ability in Modern Libraries.

    Liked by 2 people

  26. I hear you, it’s very frustrating that anything metadata related seems to have taken a back seat in the “Modern” overhaul. My take is they dumbed down SharePoint/OneDrive for Business to compete with consumer options like Dropbox. Enough already, can we please have our metadata rich SharePoint back so we can build richer solutions?

    Liked by 1 person

    1. This is GOLD. Thanks for the article.

      You are correct. MS has dumped down Sharepoint to compete with Dropbox and Google Drive (Team drives especially). My take is that they realised that developing a fully functional and decent Sharepoint site required too much skill and resources so they dumbed it down so “anyone” could do it. And they also went on to introduce Office 365 groups which in my own opinion is at odds with Sharepoint. Of course you can argue about different tool for different application and coexistence but ….

      Liked by 2 people

  27. Hi Cameron,
    We are trying to create the custom views based on content type. Maybe I’m missing something, but for the columns we want to create/show in the folder view, it’s creating a “fill in the blank” form for each new folder we are wanting to create, but the columns need to be filled out at the time a document is being added to the folder – and then display those answers in the columns of the custom view. I’m not sure if that makes sense. Hopefully you can provide some insight.

    Thanks in advance.

    Like

    1. Hi Denise,

      I’m not sure I understand your situation. Very rough guess but its it that your are seeing the columns on the form shown when creating/editing folders and you don’t want this. You just want the column on the form when creating/editing documents? If this is the case what’s happened is that the columns have been added to both the folder and document content types. You just want the column added to the document content type instead. If I’ve got that totally wrong, try to explain your scenario again and I’ll have another attempt!

      Like

  28. This looks like to not work with “new experience” in sharepoint (online) anymore … the first part with just simple “root-folder/different view” … in classic design it does display or better say’d switches the view correctly automatically when navigating into a subfolder… but with new design it simplay sticks on the top-level view… 😦

    Liked by 1 person

    1. Unfortunately a lot of the functionality we had in classic SharePoint seems to be getting shunned with the “new experience”. There has been some momentum in the last few months around metadata in the new experience so I’m hoping we start seeing more and more of this functionality appearing

      Like

  29. Hi Cameron,
    This is really helpful. Thank you so much. I believe I’m experiencing the same issue that Denise posted about. Let me see if I can explain it more clearly for you. I created a new folder content type with three additional custom columns. When I add a new document to a folder with the new content type that I created, the pop-up window that opens to prompt you for the file’s metadata does not contain the columns I added. How do I go about adding them so they only show up in folders with the new content type?

    Thanks

    Liked by 1 person

    1. If you want to be prompted for the column when you create documents inside the folder then it’s actually a custom document type that you need to create (adding the columns to the custom document type instead of the folder)

      Like

      1. Tried it today in a Modern Site and still isn’t supported. Verified that it only works when switching the DocLibrary from Modern to Classic.

        I’m confirming this in April 2019, that automatic switching of Default Views does not work. A workaround could be to create a navigation menu that links to the second-level view. Only practical if there aren’t any more than 10 items in the dropdown.

        Liked by 1 person

    1. Yes, unfortunately we lost a lot of really nice features when Modern came along. Feels like we’ve been playing catch-up ever since. I’d love to see some of these feature make there way back into Modern.

      Like

      1. I’ve run into this same issue with my new site that I’m trying to stick to the modern view 😦

        Is it maybe feasible to hack this into working by using JSON column formatting to change the link used for the title column?

        Like

  30. “That’s it – when you now navigate to the library you will see the ‘Library View’ and then clicking to navigate inside a folder will automatically switch to the ‘By Project View’.”

    this does not work for me. I follow the steps, I get two default views at the same time (one for top-level and one for folder) and whenever I navigate between top level and folder it always keeps whichever view I select.

    I’ve also played with the Per-Location View Settings, hidden views from locations, but those views still appear whenever I go back to those locations.

    Like

    1. Are you using modern or classic SharePoint UI? This article was written before the modern SharePoint UI was introduced and only works for Classic SharePoint sites. Default views at subfolder levels does not work for modern SharePoint yet, here’s a UserVoice article asking for it, please vote if it’s something you want to see added https://sharepoint.uservoice.com/forums/329214-sites-and-collaboration/suggestions/34688932-different-type-of-view-in-sharepoint-document-libr

      Update: Microsoft has removed it from UserVoice and I think the best place to direct your votes is now: https://feedbackportal.microsoft.com/feedback/idea/6db771a3-dd1c-ec11-b6e7-0022481f8046

      Like

  31. Hi, I’m Jim from Japan. I just wanted to say this article is brilliant and perfectly helped me solving my problem, not only from a technical perspective, but also in understanding the possible scenarios for multiple views in SharePoint libraries! Thanks a lot, indeed!

    Liked by 1 person

  32. Custom views, filters

    We need to create, following the Flat Site strategy aligned also with M365 groups and MS Teams, a Team Site based on a Document Library Template per each of the Teams we create. We need to include the same Content Type but also the Columns order, views, filters, etc.

    Any ideas?

    Liked by 1 person

    1. SharePoint Site Designs and Site Scripts would be the place I’d start looking to see if it can fulfil your requirement – here’s the top level info on what they are and the type of things they can be used for (which include provisioning a Document Library every time a certain type of site is created and provisioning content types) created https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview

      Like

  33. Thank you for the detailed guide! I didn’t see another comment on this (may have missed it), but for #3 “Folder default views”, this doesn’t seem to function properly. For what it’s worth, I’m using SharePoint Online. Any ideas? Is your guide for an older version?

    Like

    1. Hi Bryon. You are correct, the ‘modern SharePoint UI’ on libraries does not support this. It’s super frustrating that these rich features we had 10 years ago still haven’t made it to the modern UI 😢

      Like

  34. Hi, does Byron’s comment above also apply to #4, i.e. that the functionality in broken in the new version of SharePoint? I have followed the steps but the view will not change based on the content type, i.e. when I navigate to the folder with a specific content type and view set for that content type it stays the same as the top level view. (If I change the view manually it applies it to all levels.)

    Like

    1. Hi soriordan890. Yes, unfortunately #4 is broken in modern SharePoint UI as well. All the configuration option options are still 100% there and will let you set it all up, yet they are totally ignored. Defies all logic, and leads to a really frustrating experience.

      Like

  35. Hi Cameron – thanks very much for writing this article – very very interesting, and exactly what I needed. I’m using #4 – Custom Folder Default Views.

    Pity that it is broken in the modern UI though….

    Be nice if Microsoft didn’t do this sort of thing, but unfortunately, they do (a lot).

    Liked by 1 person

    1. You’re welcome and thanks for leaving your message. The lack of support for this in modern is a real pain point. There hasn’t been any real progress that I’ve seen under modern UI to try and bring support back in for all these really handy features

      Like

  36. Hi, in Procedure 3 where you state, “That’s it – when you now navigate to the library you will see the ‘Library View’ and then clicking to navigate inside a folder will automatically switch to the ‘By Project View’.” . . . this does not happen for me. I followed each step, but when I open a folder the view is still my Top Level view. And if I try to select the Inside Folder1 view, when I go outside the folder to the top level it still shows. To sum it up, it’s just whatever view I select manually that still shows everywhere. Nothing is automatically assigning itself to the Show In levels for me. I’m in SP Online for O365. Thanks.

    Like

    1. Hi Tonie – thanks for leaving your comment. There’s a lot of comments been left on this post in recent years around a lot of this functionality not working in SharePoint Online anymore. The SharePoint UX (for SharePoint Online) has changed radically and while the configuration options are still there to set up the default views the “modern” UI simple ignores many of these settings. It’s a terribly confusing experience and I’ve tried to highlight this to Microsoft many times. There is still an option to switch a library back to “classic” I think and this should allow these setting to work again but I imagine it’s only a matter of time before they will force you onto the “modern” UI. I’ll keep pushing Microsoft as these features were really useful in building effective solutions on SharePoint and I really want to see them return to the modern UI.

      Like

      1. Thank you, Cameron. At least I know it’s not just me. I am usually pretty good with the Power Automate workarounds but I’ve been hitting brick walls right now with everything from file attachments to document sets to now folder views. I CAN get the different views to work with Document Sets pretty easily, which I have in one of my libraries. However, the document sets won’t do what I need in Power Automate. So that’s why I was trying the folder solution. I have a requirement to prove and show what attachments were provided when a User approves a reporting request. And I can’t use http requests and my company won’t turn on Outlook 365 so I cannot use Outlook connectors at all in Power Automate. I’m pretty much running complex Approval flows for several departments like MacGuyver with bubble-gum and rubber bands and standard email connectors. In lieu of the folders I’m going with a list with attachments, instead, which it turns out display pretty nicely in a Share email from SharePoint. So tomorrow I will attack an approval flow for that. Take 357. Action. 🙂

        Liked by 1 person

  37. Thank you for your guide, very helpful, though disappointing that we still have to use the classic experience in 2022.

    I don’t need different views for every document library, so I could keep most of them in the modern experience, but I know the difference in UI is going to confuse users… I wish Microsoft would add all these great features back into the modern experience so we don’t have to keep swapping, but it’s been years so I doubt they’re going to.

    Like

    1. Thanks for leaving your comments Bronnen I like to think people from Microsoft read this article and these comments from time to time. Your comments represent the real business need out there. Thank you.

      Like

      1. Hi Cameron,

        I thought I would share a partial solution for anyone looking to have different views within folders. While it is not supported for normal folders, it is for document sets.

        Set up your document sets and add them to the library.

        Go to Library Settings > Content Types > Document Set Content Type.

        First, go into Advanced Settings and change the Read Only option to No so that you can edit the document set.

        Then, go into Document Set Settings > Welcome Page View and select the view that you wish to be the default for that ‘folder’.

        Now when you open the document set it will automatically change to that view.

        I hope this helps someone else as much as it helped me!

        Liked by 1 person

  38. thank you for that satisfying explanation
    i did follow all your steps to create document library and assign a default view for every folder and it works perfectly
    but the issue here that when i try to upload a new document into any of the folders it show me all created fields not only the one in the view
    would you support please

    Liked by 1 person

    1. Hi Mohamed, thanks for leaving your comment. The views in SharePoint don’t dictate the columns of metadata that exists on each item in the library. By default every column of metadata you create in a SharePoint library will exist on every item in the library. Different views just give you different ways to look at that data (show different columns in the view, arrange them in different ways etc). To store different metadata on different types of items in the library you can use SharePoint Content Types. Here’s a link to the Microsoft documentation on content types https://learn.microsoft.com/en-us/sharepoint/create-customize-content-type?WT.mc_id=M365-MVP-5002900. This will be the latest documentation for SharePoint online. Although this article is a bit older (and the SharePoint UI may have changed) I think it gives a better explanation of what content types are and how you can use them https://sharepointmaven.com/introduction-to-sharepoint-content-types/

      Like

  39. Hi Cameron, I am using Document Sets to group documents for each project, so that I can use the capture version functionality to make document baselines. Inside each document set I have a standard folder structure for different document types. My problem is that it seems that my default view for folders content type gets overridden by the document set default view. Do you know of a work around for this issue?

    Like

  40. I appreciate the thoroughness in your articles!
    I completed every single step in section 4: Custom Folder Default Views, but unfortunately my efforts don’t seem to have had any impact/effect on my folder views. When you stated, “Browsing to these folders now you should find that the default view is changing automatically as you navigate.”, I did not experience that at all – I was still seeing the default view for all folders. Is there any known reason why these steps wouldn’t work?? I even went through all steps again, to ensure every setting was accurately according to your screenshots. I also tried section 3: Folder Default Views, and that simpler process didn’t seem to have any impact either.
    I am an admin of the site, but not a ‘super admin’ for the larger company I work for. Could that be the cause? Could there be some sort of setting higher up that prevents my changes from applying?
    TIA for any light you can shed on the issue.

    Liked by 1 person

    1. Thanks for the comment Ashley. Unfortunately Microsoft has modernised the SharePoint UI in recent years and these settings simply don’t work anymore. If you read through the comments on this post you’ll get the full picture. There is an open feedback to Microsoft to fix this and bring the capabilities back https://techcommunity.microsoft.com/t5/microsoft-365/sharepoint-online-modern-experience-issues-with-custom-views/m-p/210266#M14086

      Like

  41. Hi,
    I tried those methods multiple times and also failed. Until I read the comments…
    But I managed to use JSON-settings in the column to get the default view for each folder adding this into Name/Topic-column:
    {
    “$schema”: “https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json”,
    “elmType”: “a”,
    “attributes”: {
    “href”: “=’../../../..’ + [$FileRef]”
    },
    “style”: {
    “text-decoration”: “none”,
    “color”: “black”,
    “font-size”: “13px”,
    “font-family”: “Segoe UI”
    },
    “txtContent”: “[$FileLeafRef]”
    }

    Those multiple dots and slashes are not the prettiest thing in href but as a new to JSON I got this working somehow. Looking the URLs there is defaultview.aspx when I click different kind of folders. Of course I lose action buttons etc. but I could enable those by creating an extra column.

    Liked by 1 person

Leave a comment

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

Create a website or blog at WordPress.com

Up ↑