none
Sorting of TermSets in Managed Metadata

    Question

  • Anyone,

        I need to sort my Term sets numerically.
    I'm using code to render them to a JQuery Treeview.
    foreach (TermSet item in termgroup.TermSets)
      {   
            ..... build them here.....


    M Sariman RKO Business Solutions Inc.

    Wednesday, May 09, 2012 3:52 PM

Answers

  • Hi Mohamad Sariman,

    I don't see a way to sort the terms as they were numeric.

    But you can :

    Modify the numbers to make then be sortered the way you want. For example rename "2. Corres..." in "02. Corres...".

    Or fix the sort order in the SharePoint user interface:

    1. Go to the site where you want to custom sort terms (if you are updating a local term set).
    2. On the Site Actions menu, click Site Settings.
    3. Under Site Administration, click Term Store management.
    4. In the Properties pane, select the Managed Metadata Service application you want, if it is not already selected.
    5. In the tree view pane on the left, expand the groups to find the term set that you want, and then select the term set.
    6. In the pane on the right, click the Custom Sort tab.
    7. Under Custom Sort Order, select Use custom sort order.
    8. Click the arrows in the boxes next to the terms to reorder the terms in the sequence that you want.
    9. Click Save.

    Source : http://office.microsoft.com/en-us/sharepoint-server-help/create-and-manage-terms-within-term-sets-HA101631581.aspx#_Toc266880362

    Regards,

    Ludovic Caffin

    Wednesday, May 09, 2012 4:29 PM

All replies

  • Hi Mohamad Sariman,

    I don't see a way to sort the terms as they were numeric.

    But you can :

    Modify the numbers to make then be sortered the way you want. For example rename "2. Corres..." in "02. Corres...".

    Or fix the sort order in the SharePoint user interface:

    1. Go to the site where you want to custom sort terms (if you are updating a local term set).
    2. On the Site Actions menu, click Site Settings.
    3. Under Site Administration, click Term Store management.
    4. In the Properties pane, select the Managed Metadata Service application you want, if it is not already selected.
    5. In the tree view pane on the left, expand the groups to find the term set that you want, and then select the term set.
    6. In the pane on the right, click the Custom Sort tab.
    7. Under Custom Sort Order, select Use custom sort order.
    8. Click the arrows in the boxes next to the terms to reorder the terms in the sequence that you want.
    9. Click Save.

    Source : http://office.microsoft.com/en-us/sharepoint-server-help/create-and-manage-terms-within-term-sets-HA101631581.aspx#_Toc266880362

    Regards,

    Ludovic Caffin

    Wednesday, May 09, 2012 4:29 PM
  • Hi Caffin,

       Using the 02. works but using the second  method by fixing the sort order still returns sorted at runtime.

    Might need to talk to user if adding '0' is ok.


    M Sariman RKO Business Solutions Inc.

    Wednesday, May 09, 2012 4:40 PM
  • I'm currently building a navigation control from managed metadata and despite changing the sort order in the Term Store Management Tool, the items are still rendered in alphabetical order. Is there any way to override this?
    Thursday, November 15, 2012 12:24 PM
  • Hi Jac747,

    Could you please tell me more about what you try to do?

    Do you have a code sample to illustrate the problem?


    Cordialement/Regards,

    Ludovic Caffin
    .NET/SharePoint Consultant for A3IS.

    Monday, November 26, 2012 10:19 AM
  • Method 2 doesn't work and it appears to be a bug in SharePoint - when you sort a list using such a Managed Metadata column it still sorts alphabetically instead of using the custom sort order.

    Thursday, August 29, 2013 2:55 AM
  • Try downloading latest SP and/or run Taxonomy Update Scheduler timerjob to solve the problems for method 2.
    Monday, November 11, 2013 11:26 AM
  • Are you saying "download the latest SP" because you know there's a patch that addresses this bug? Or are you guessing? 

    Because I'm on SP1/Nov2012 and seeing the same thing - custom sort doesn't work in a list view. The XSLT for the view simply indicates the sort order to be the name of the column, which would produce this effect. 

    An update would probably have to add a related field of the custom sort order and tweak the XSLT to use that related column. 

    Ah crap - I'm going to have to go write this, aren't I? 

    Philo


    Philo Janus, MCP Bridging business & Technology: http://www.saintchad.org/ Telecommuter? http://www.homeofficesurvival.com/ Author: Pro InfoPath 2007 & Pro InfoPath 2010 Pro PerformancePoint 2007 Pro SQL Server Analysis Services 2008 Building Integrated Business Intelligence Solutions

    Monday, December 09, 2013 11:10 PM
  • Just had to say,  I am so glad I found this!!!  I was going nuts trying to figure out what SP was doing with the sorting and did not see that Custom Sort tab at the top of the page.
    Saturday, September 27, 2014 3:18 PM