Is it possible to use wild cards in custom sorting

Hello,
I want to sort rows using custom sorting but I would like to use wild cards. Is it possible?
I tried your example in JSFiddle (http://jsfiddle.net/flexmonster/39z1xy8y/).
I changed JSFiddle example’s sortOrder like this
“sortOrder”: [“Bike*”,
“Car*”,
“Clot*”,
“Acc*”,
“Comp*”
]
* is supposed to be a wild card but it will not work. Is there a way to accomplish this?
Thank you,
Hannu Polso

4 answers

Public
Ian Sadovy Flexmonster April 26, 2018

Hello Hannu,
 
Thank you for the question.
In the current version, there is no such option.
The good news is we already implemented “sorting function” feature and it will be released with the next major update.
So, you will be able to write custom rules for sorting a specific hierarchy.
Sample code looks as follows:

new Flexmonster({
report: {...},
...
}).sortingMethod("Category", function(a, b) {
// custom compare members
return a < b ? 1 : -1;
});

Hope it helps.
 
Regards,
Ian

Public
Hannu Polso April 26, 2018

Hello,
Yes, a sorting function would help. Do you have a schedule for the next release? The reason I ask for the schedule is that I must consider doing a workaround for the time being.
Thanks again,
Hannu

Public
Ian Sadovy Flexmonster April 26, 2018

I cannot provide you with an exact date of the major release.
But approximately it will be in May-June 2018.

Public
Hannu Polso April 26, 2018

thank you 🙂

Please login or Register to Submit Answer