0

Yes, OK folders=bad. With that out of the way, what's the best way to have folders appear first in a Documents library then have the documents sorted alphabetically? Right now I'm sorting on Title which is blank or null for folders, then Name linked to document with edit menu. Any better way? This seems to work so far but I'm concerned that relying on a blank meta-data field might not be the best course of action.

1
  • Instead of Title you can use "Folder Child Count" Decsending, which will put the folders to the top. Dec 27, 2017 at 21:14

3 Answers 3

1

Done a lot of searching and this is the best solution I've come up with so far to mimic file explorer behavior. Sorting on the Title metadata field which is blank or null for folders, then the Name (linked to document with edit menu) metadata field gives you Folders sorted to the top of the listing alphabetically, then Files sorted alphabetically BUT if you have users that put information into the Title field of the documents, then you're back to square one. One other option is to sort by Type first then Name.

0

Option 1:

I agree with - Damjan Tomic

Option 2:

Another option I found was provided by LauraRogers MVP on MSDN Social entitled: Custom Ordering in Document Library

create a custom "folder" content type:

  1. Site Settings - site content types
  2. Click Create
  3. Call it "New folder" or whatever you want. parent content type = "folder content type" and then "folder".
  4. Create a new site column to be associated with this new content type. Call it "folder order" or something, and make it a number column.
  5. on your library, go to library settings and advanced settings. Change "allow mgmt of content types" to YES
  6. In the library's settings "content types" section, click to add an existing content type, and pick that new one called "new folder" at step 3
  7. In the library's advanced settings, change "Display "New Folder" command on the New menu" to NO.

Now in the "new" drop-down box there's the ability to create a new folder, and that new folder has a "sort order" column. Then you just have to sort your list by that column (MSDN Social).

2
  • OPTION2: I've seen that but doesn't that require the user to populate the column with a value? I'd like this to be passive and additionally sort the folders alphabetically. Just like how Windows File Explorer works.
    – TadLewis
    Dec 28, 2017 at 15:32
  • OPTION 1: Tried that but SharePoint faithfully sorts on the number of child nodes in the directory so it doesn't end up being alphabetical.
    – TadLewis
    Dec 28, 2017 at 16:20
0

Sort on Item Child Count (descending) instead of Folder Child Count. This will put folders at the top.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.