9

We have a policies list view on SharePoint 2010 that presents information in this fashion:

[+] Category : Requirements (2)
   [+] Subject : Library guidelines (2)
      2.1.
      Photocopying of entire books is discouraged.

      2.2.
      Users must notify the staff before removing books from the reference area.

   [+] Subject : Permissions (2)
      1.1.
      Outside researchers require authorization to access the library.

      1.2.
      Staff can do free reading in off-hours.

We need the 1.1. and 1.2. to appear before the 2.1. and 2.2. items. So the group Subject : Permissions needs to appear before the group Subject : Library guidelines. In this one case, it can be done using descending order on the groups. But it won't always be alphabetical. We need it to respect the Item Order first when sorting.

Those items (1.1., 2.1.) are stored in a rich text field, Sub-Item, meaning sorting isn't available. We've added a number column Item Order to allow sorting on that, but then the grouping gets in the way. When grouping, it sorts ascending or descending; it first sorts on the groups, then on the Item Order.

Any way to solve this with the standard OOTB views in SharePoint? Thanks.

  • This doesn't work once you hit double digits...10 will appear right after 1, then 2, 3, etc. I'm looking for a solution. – Quasimodo Jun 7 '17 at 14:49
4

For other people who run into the issue of ordering Groups but do not want to add any other (visible)characters to the title here is a small tip.

Add spaces! More than one space is not shown in HTML so adding multiple can be done without harming the layout of the lists in most places. Spaces will be sorted to the top, so the title with most spaces in the beginning will be the first, the heading with second most spaces will be the second from the top, etc.

We needed to order a series of headers with names that did not sort alphabetically and did it like this:

  Heading one
 Heading 2
Heading 03

When displayed in the list it will look like this:

Heading one
Heading 2
Heading 03
4

Simplest possible solution is to include section number in group field:

1. Permissions
2. Requirements

Problem is that you can apply sort on groups only on group field. So if you use number in front of group name you can get desired results.

  • 1
    Thanks, Vedran. That's simple and elegant. Gets the job done very nicely :) – Alex C Jan 22 '12 at 16:17
1

You can create a calculated column with a type "number".

=IF(category="Permissions","<span style='display:none;'>1</span>CategoryName","<span style='display:none;'>2</span>Requirments")

And then do a group by your new column. Type "number" is required to output pure html.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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