This question about Issue in browser: Answered

sorting not working

Hello,

First time writer here I hope to find help regarding a sorting issue.

Below you see a list, ordered alphabetically from A-Z. Within the list there are sub groups that are not sorted.

order.png

Here is the code that writes the page (wiki format). What should I add so that the 3:rd level om links are sorted alphabetically?
%SEARCH{"form.name='Mallar.FirstPageForm' 
       AND fields[name='Servicedesk'].value='Ja'" 
   type="query"
   web="Kunddokumentation" 
   topic="WebHome"
   recurse="on"  
   nonoise="on" 
   format="   * [[$web.WebHome][$percntQBCOSTUMERID{$percntFORMFIELD{\"Kundnummer\"
                   topic=\"$web.WebHome\"
                }$percnt}$percnt]] -
       [[$web.KontaktLista][Kontaktlista]]
       $n      * [[$web.ServicedeskDocumentation][Servicedeskdokumentation]] 
          $percntSEARCH{\"^Lathund[A-Z]*\" 
             web=\"$web\" 
             scope=\"topic\" 
             type=\"regex\"
             nonoise=\"on\" 
             header=\"$n\"  
             order=\"$dollarformfield(date)\"
             format=\"         * $dollarweb.$dollartopic - $dollardate\"
         }$percnt 
      $n---" 
}%

Kind Regards

/Henrik

-- HenrikJutterstrom - 13 Nov 2015

I believe all you need to change is the "order" parameter where you have "formfield($dollardate)". If you wanted to sort alphabetically by the topic name, that would be order=\"topic\". As an aside, the format you have is also not correct for sorting by date. That would be simply order=\"date\" If you intended to sort by a field that is named lower case "date" then it would be order=\"formfield(date)\".

-- Main.LynnwoodBrown - 14 Nov 2015 - 14:45
 

QuestionForm edit

Subject Issue in browser
Extension
Version Foswiki 1.1.9
Status Answered
Related Topics
Topic attachments
I Attachment Action Size Date Who Comment
order.pngpng order.png manage 66 K 13 Nov 2015 - 14:56 HenrikJutterstrom  
Topic revision: r3 - 14 Nov 2015, LynnwoodBrown - This page was cached on 03 Jun 2017 - 06:43.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License