Contains tips for configurators working with Aware IM
#43773 by hpl123
Tue Jun 27, 2017 10:43 am
Hi all,
Here is a tip to fix the bug with sorting not working in queries if you use grouping (i.e. if you use grouping and group data based on some attribute e.g. category, the sorting is not respected so no matter what you configure in the configtool etc. the sorting doesn´t work):
Add the following to the queries advanced (init) script and the field parameter is the sorting you want to use:
Code: Select allvar ds = config.dataSource;
ds.serverSorting=false;
ds.sort = {field: "PriorityScoreTemp", dir: "desc"};
#43774 by PointsWell
Wed Jun 28, 2017 4:53 am
Should this work with shortcut fields?

I have a query that is grouped on a category name (sc_Status) but I want to sort on sc_StatusCode to override the alphabetic sort of sc_Status, but when I put the following into initialisation it still sorts by the Grouping

Code: Select allvar ds = config.dataSource;
ds.serverSorting=false;
ds.sort = {field: "sc_StatusCode", dir: "asc"};
#43777 by hpl123
Wed Jun 28, 2017 7:43 pm
Not sure but think it should work for shortcuts as well, try it with regular attributes and see if that works (and if that works but not the shortcut then I guess it´s something special with the shortcuts).
#45792 by rprinzing
Tue Dec 05, 2017 2:50 am
YES! That works.
However, what does the syntax need to look like if the sort is MORE than one field?
I need to sort by TimeAppointment, NameFirst.
Certainly hope future versions address this bug. Plus ONE.
Thanks!!!!
#45793 by johntalbott
Tue Dec 05, 2017 6:14 am
Code: Select allds.sort = [{ field: "TimeAppointment", dir: "desc" }, { field: "NameFirst", dir: "asc" }]

Who is online

Users browsing this forum: No registered users and 4 guests