1,804 articles and 14,753 comments as of Sunday, April 3rd, 2011

EndUserSharePoint has combined resources with NothingButSharePoint.com. You can now find End User (Mark Miller), Developer (Jeremy Thake) and IT Pro SharePoint (Joel Oleson) content all in one place!

This site is a historical archive and is no longer being updated. Please update your favorites, bookmarks and RSS feeds.

NothingButSharePoint.com
Monday, March 30, 2009

Create a Custom Sort Order in a SharePoint List

It’s a common question: “How can I create a custom sort order in a list?” My typical response has been to create a hidden column called “Sort Order”, manually set a numerical sort order for each item and then hide the column from view.

Today on Stump the Panel, Woody came up with an ingenious solution using the Links list as a foundation. Take a look at this one and a half minute screencast. I laughed out loud it was so simple.

Embed this Screencast

  

Resources for this article:

 

Please Join the Discussion

12 Responses to “Create a Custom Sort Order in a SharePoint List”
  1. Brian Salsman says:

    Great article. I am running MOSS 2007, however, when I create a links list, I do not see the change order menu item outlined in the video … thoughts?

  2. Eddie says:

    The screencast is broken. I’m very interested in seeing this solution in action.

    Thanks!
    Eddie

  3. Brian – Just checked and everything is fine with the screencast. You might want to talk with IT to make sure streaming video from ScreenCast.com is not blocked. – Mark

  4. Eddie says:

    That’s what the issue was…able to get to it via our test DSL line…thanks!

    Eddie

  5. Tom says:

    I would like to sort order a group of folders within a document library. It seems to order on most recent update but I’m looking to have it sort on the folder name. The Link list solution doesn’t appear to work for me since these are folders (with documents) and not links. Your hidden column might work – is there a video on that?

  6. Gord Reid says:

    Hello,
    This is close to what I need, however, I am looking at creating a calendar roster and sorting the individuals posted to the roster in a specific order. The idea is that when a call comes in for assistance, the necesary person in order of the group 1 through 7 answers when it is their turn. All I need is the calendar to show these people on the list for the day and the position they are in. Please help!!! This one is driving me nuts!

  7. Jeff Smith says:

    I’ve found this solution to not be very practical when actually trying to use it unless you’re basing your list around a URL.

    The reason for this is the item name displayed on the Change Order page is always the URL name. If you hide the URL column then you’ll just see a bunch of blank names on the Change Order page, which isn’t that useful.

    Most people I expect would hide the URL column and probably add a new “Title” or “Name” column to the list and would like to have that new column show up on the Change Order order page, but that cannot be done. There isn’t a way to select which column shows up as the name on the Change Order page.

  8. Anthony says:

    Ok, this is a great solution for SP 2007 – but the same concept does NOT apply to SharePoint 2010 Links lists – any suggestions? So far, I have not been able to alphabetically sort a SP 2010 Links list, and have it save as the default view on the page.

  9. Don says:

    I found a very simple way to sort a list. Create a calculated column in your list. Concatanate all the columns you want and the order you want to sort them;

    =column1&column4&column2

    Make this column a hidden column and your list will be sorted in this order.

  10. Nali says:

    Excuse, please, for my English…
    At me the question – whether is possibility to change an order in the field “Lookup field”, without deleting from it values and inserting them back

  11. Jeremy says:

    I am wondering the same thing for document libraries. I have several documents under various content types that are linked to content query webparts on various intranet pages. I want to have the option of the order which they are displayed on the page. When editing the content query webpart I first sort by content type and then by Item order (a column I created in the library) however when I do this the webpart comes up as not finding any items. When I leave it as just the content type then my documents show up on the page.

    Any thoughts?

Trackbacks

Check out what others are saying about this post...
  1. SharePoint Daily for March 31, 2009…

    Top News Stories Build and Debug Web Parts with SharePoint Extensions (Redmond Developer News) One of…




Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!