How can you customize sort order in a category selector? For example, I want to sort a category field with categories: "yes", "no", and "unknown", but I don't want them in alphabetical order (ascending or descending). What do I do?
Hi Celeste,
I don't understand the question.
Do you have another example?
-Bill
Sure Bill,
Maybe it would help if I inserted a photo example:
I want the options to be in the following order: Yes, No, Unknown
But the only options are No, Unknown, Yes OR Yes, Unknown, No (because you can only sort Ascending or Descending. I run into this with several other category selectors, too. Age ranges, for example, are text variables and not numeric, so an age range 5-9 would be sorted "higher" than 15-19 because of the 1 in 15.
Okay,
You could add a field to your table to sort on.
Or,
If you have a feature class with lots of repeated values in the category field >
It is tempting to join it first but esri does Not currently support this when you publish it with Feature Access enabled.
(Map Service join is supported but then the ability to select a chart and have the map interaction is not supported - Only works with Feature Access enabled. "Catch-22")
So you can use the new table to present the sorted selector and have its filter options control selection of the other widgets.
Celeste Illian
Currently the custom sort is not supported to arrange the Selector buttons on the Dashboard. The only option is to sort Ascending/Descending based on an attribute fields.
To workaround this limitation, you may create a new column and assign the numbers (according to the desired arrangement). Then, create a list for this column and use category names for labels and sort numbers (values from the field) as codes. Then use this column as the category field in Selector on the Dashboard. While sorting is based on the numeric values, categories show up with their labels.
Best,
MJ
HI MJ,
I just followed these directions to be able to sort based on day of week. I set up a new field, added a domain list and labeled it Monday through Sunday. Then I added the codes 1-7. When creating a serial chart in operations dashboard, I select this field in category and sort based on name. The chart is still sorted by the label and not the code. Did I miss a step?
Hi Samir Farhat,
Without checking your data table and the domain list you created I cannot be sure if you have missed a step or not. However, I'm able to confirm that this workaround still works. Images below show the details of my data and configuration:
Please check your table and domain list and let me know if it's still not working for you so we can take a closer look.
All the best,
I think I see my error. The field Daywithdomain contains the label on my table, not the code. Is there a way to quickly calculate that field to convert the label to its corresponding code?
Hi there,
I have a similar issue. I'm trying to sort a serial chart in a dashboard by 5 year age bands.
The age bands aren't sorting properly as they go beyond 100. I've created a new numeric field in my feature class, to be used for sorting. However once the layers is uploaded to AGOL, it wont let me select it as a sort field when I'm setting up my serial chart. My only option is to select my age band field.
I also tried creating domains in my FGBD for the age bands so they are recorded as codes. But this hasn't worked either.
Any suggestions would be greatly appreciated.
Thanks
Bryn Morris-hale
Hi,
In this workaround, you are basically using your category field to sort by using domains. You can not use a field as category field and use a different field to sort categories on the chart.
You need to create domains for the "AgeBand" field and make sure that numeric values are assigned as codes (not labels).
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.