Is there a way to change the sort order in the filter widget, especially to Natural Sort?
I have set up an expression using the unique values option. Nice as it gives me the list of values to filter on, but they are sorted alphabetically, and I need a natural sort option.
Really confusing the the user when things are way farther down the list than expecting.
W1 and W2 should come before 10, and so on.
|Looks like this||Want to look like this|
@RhettZufelt It appears to be the current sorting mechanism and we will take a look at it to see if it can be enhanced. Thanks for bringing it up.
@RhettZufelt - after investigation, here are some complications to your case -
If the values are just labels, then there could be a way to sort them naturally, such as the following case:
However, it is values that are being used for Filter > SQL in your case, thus, it may be the current designed behavior - since it says string field value by the starting 'W', it could not use the numeric logics, which will honor the natural sort order.
A workaround might be, to use 01 to distinguish 10+ numbers. Hope it could help.
Thanks @TonghuiMing, however, I really can't be changing values of a standard in order to work around the sort issues.
Any chance future versions we can have full access to SQL in the Filter Widget instead of the limited set available in the drop downs? Natural sort on this kind of data is not too difficult with SQL if we have the tools available.
Also, am I just missing it, or is there not an option to decide sort field/order in the Filter Widget other than the default sort on the Filter field?
If there were a way to sort on field of choice, I could use SQL to populate/maintain a separate column for sorting as a workaround.
Hi @RhettZufelt - we have done some enhancements for the sorting for the release yesterday. Could you please check again and see if the natural sort works for you now? I do not know your data type/structure - are these coded values or not?
It would be nice if you could share with me the data for a quick test as well, if possible.
@TonghuiMing There is a domain on the field, and my filter query looks like:
So it only pulls values that are currently populated in the data.
The drop down list I get when I edit/add a feature shows the entire domain list and is sorted by the order of the domain table (so, no sort).
It appears as if the filter widget is still sorting like the previous version:
I tried to add you to my ESRI support group, but couldn't find @TonghuiMing.
Okay, let me try creating some data similar tomorrow and give it a try first. Thanks for the info.
I'm running into these issues as well, but using Predefined Unique Values. I need to be able to sort the predefined values filter smallest to largest, but keep different nomenclature. See below. I can drag the predefined values to my desired order, but it does not affect the way the filter is sorting in the app. It seems that it defaults the sorting based on the Label. As a workaround, I can change the labels to get an order I need, but it's not very clean and it would be easier if the order I specify when I'm defining the values was used in the app.
Is there perhaps any update on this question @TonghuiMing? I am looking at the same thing as the others described. I would be great if the configured order is honored.
Attached I have a sample. Although in Dutch, I presume the intended order is pretty clear.
Any update would be much appreciated.