Monday, April 9, 2012

make list columns sortable in SharePoint 2010

After you have imported a list from an excel sheet into SharePoint, you may wish to make some columns sortable like so:

  1. clicking anywhere in a list brings up the "List Tools" tab of the menu ribbon
  2. click on the "List" subtab of the "List Tools" tab
  3. click "List Settings"
  4. click "Indexed columns"
  5. click "Create a new index"
  6. select the name of the column to make it sortable

 
 

When you get to the last step you may be frustrated to find that the column you wish to sort on isn't an option. This will happen with columns that have content of multiple lines which make their way into SharePoint as both "Multiple lines of text" and "Rich Text" begging to be addressed like so:

  1. get rid of the rich text first
    1. clicking anywhere in a list brings up the "List Tools" tab of the menu ribbon
    2. click on the "List" subtab of the "List Tools" tab
    3. click "List Settings"
    4. click the name of the applicable column
    5. modifty the column: you will be able to set the rich text to plain text, but you will not yet be able to drop the multiline setting
       
  2. get rid of the multiline setting
    1. clicking anywhere in a list brings up the "List Tools" tab of the menu ribbon
    2. click on the "List" subtab of the "List Tools" tab
    3. click "List Settings"
    4. click the name of the applicable column
    5. modifty the column: you will now be able to make it a single line of text
       

9 comments:

  1. over a year later, and you just helped me with this post! Thanks!

    ReplyDelete
  2. it throws alert message("changing the column type may result in a lose of data. are you sure that you want to change this column from existing Multiple lines of text column to a Single line of text column").. shall we lose existing data of this column? please help me out

    ReplyDelete
  3. I have not worked with SharePoint in over a year. My comments above suggest you would lose FORMATTING but not DATA and suggest there is no other way to make multicontent sortable. If you have an alternative please share it. :)

    ReplyDelete
  4. *multiline content NOT multicontent

    ReplyDelete
  5. Thanks this info helps :).. would like to know will there be lose of data for the existing records if we change single line text type column to choice type, Please let me know if you happen to know

    ReplyDelete
  6. I don't know. It sounds like there is a chance if you're getting that alert. Can you experiment with what happens in a dev environment.

    ReplyDelete