SharePoint Links List: Sorting/Ordering a Links List by Adding a custom sort order field/column

Create a more visually appealing links lists using a simple sort order column.
Create a more visually appealing links lists using a simple sort order column. | Source

No-Code SharePoint Solutions are Awesome

As with most things SharePoint related, I don't desire to have unyielding power and control over everything I develop. Instead, I just want to squeeze a little more functionality out of the pre-canned features. Links list are one of the most simple of the standard SharePoint 2007/2010/2013 out-of-the-box lists. You get a URL field, which has the URL and a display name, and then some other fields that never get used, like the notes column.

Further to the simpleness, when you add new links, they're displayed in the data entry order, which behind the scenes is just the ItemID. Call it simple, call it useless, but this is easy to overcome by sorting in alphabetical order. Unfortunately, this is still at not as useful as one would like, as you can see in the picture below.

With the addition of just one simple number column, you can exponentially increase the usability of a links list to create a custom sort order, and even fake a category if you so deem fit. (I'll discuss adding a real Category meta-data column later.)

A typical list of links sorted in alphabetical order
A typical list of links sorted in alphabetical order | Source
Add a number column to the Links list to allow for custom sorting
Add a number column to the Links list to allow for custom sorting | Source

So, the big trick is to add a simple number column to the Links list, such that you can sort by it later in a view. To accomplish this,

  1. navigate to the list settings,
  2. add a new column.
  3. Select a number field
  4. No decimals.
  5. Set a minimum value of 0
  6. Required: I don't require a value, but if you're working with multiple people, then it might be a good idea.
  7. Unique values: For this technique, I don't enforce unique values, as I need to use a number more than once. Adjust yours as needed.
  8. Default value: You can opt to add to the default value, depending on need.
  9. Add to default view: I usually do it when I start, then remove it from the views later. (It makes testing/debugging easier.)

Click ok to save the column, then add some data to support the cause.

Set the custom sort order using the new field and the URL field.
Set the custom sort order using the new field and the URL field. | Source

Next, you'll need a view that uses the custom sort field. To make that happen, click the Create View from the ribbon.

  1. Name it SortNoURL. (I always forget to do this first.)
  2. Remove all fields except for URL.
  3. Change the 'Allow users to order items...' to No
  4. Select the new field, SortNo, and then sort Ascending
  5. Select the URL field, and then sort Ascending

Click ok to save the view. Test and verify your effort.



To finalize the look of the top picture, you can add dividing lines by adding new links then putting in a dummy URL, and then some dashes for the display. I went a little further by faking category names. This is the extreme quick & dirty method, but if you really care about categories, you can add a category metadata column, and group by it. (I wrote about that, too. Please see 'SharePoint Links List: Add a category and custom sort order'

So for the dividers, I give them each their own number, but if you need to save a number, then just know that the hyphen (-) is sorted after letters and numbers. (The underscore may sort above, I didn't test.)

Thus, the simple trick of adding a column, populating the data, and making a view to use it gives that extra ounce of juice from the SharePoint Links List squeeze.

More by this Author


Comments

No comments yet.

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working