Change the sort order of a list collector

achecketts
Kilo Explorer

I have a list collector setup as a variable within a Service Request which point to a database that contains a list or Companies. I need to sort this list of Companies within the list collector in a certain order.

At the moment the list collector is always showing the Companies in alphabetical order. I have added a sort column into the database which contains the sort order I want but I'm unable to get the list collector to sort in that order.

Any help would be appreciated.

Thanks
Adrian

15 REPLIES 15

stevis
Kilo Explorer

I have the same issue, anyone have any suggestions? I have a field in the table called u_order, but don't know how to make the list collector use this field for sorting.


todtoter
Mega Expert

I am too, I have an Integer column called u_order. I want to order by that column.



I am using this to filter:


http://www.servicenowguru.com/scripting/client-scripts-scripting/changing-filter-list-collector-vari...



Filtering works GREAT!! but it's not sorted:


var filterString = 'u_active=true^u_list=cc_age^ORDERBYu_order';


Todd did you ever find a way to sort your list collector based on the u_order column?


Anurag Tripathi
Mega Patron
Mega Patron

Hi Adrian,



Query Business rule will help you here but you have to ensure that it runs only for the list collector, otherwise it will have a global impact on the table you are querying.


-Anurag