Summary
When using the Category selector in a dashboard, Category Field can only be sorted by the selected field or Count. There is no option to sort the selected Category Field by other fields in the layer. This article describes the workflow to apply a custom sorting to the categories in the Category selector in ArcGIS Dashboards.
In this example, there are two fields in the layer table, State and Population. The selected Category Field is State, but there are only two options in the Sort By section, State and Count. It is not possible to sort the State field by the Population field.
Procedure
Complete the steps below to apply a custom sorting in the Category selector in ArcGIS Dashboards:
- In ArcGIS Online, click Content > My Content, and select the layer used in ArcGIS Dashboards.
- In the layer's item details page, click the Data tab, and add a new integer field to the table using the Table or Fields view. Refer to ArcGIS Online: Add a field for steps to do so. In this example, the new field is Rank.
- Populate each value in the new field based on the Population field's values. In this example, the Rank field is populated with 1, 2 and 3 according to each value in the Population field in a descending order.
- Create a list for the Rank field, and manually label its values with the State field's values.
- On the Data tab, click Fields. Under Display Name, click the new field. In this example, the field is Rank. The Rank field's page opens.
- On the Rank field's page, click Create List.
- In the List of Values: window, under Label, add the State's names and under Code, add the corresponding Rank field's values.
- Click Save.
- Open ArcGIS Dashboards in edit mode, and customize the Category selector.
- In ArcGIS Dashboards, hover on the header or side panel, click the Add Category selector icon. The Category Selector page opens.
- Click the Selector tab, and on the Selector Options pane, in the Categories From section, select Grouped Values. The Select a layer page opens. Under Layers from 'Dashboard_name' map:, click the desired layer.
- On the Selector Options pane, in the Category Field section, select Rank from the drop-down list.
- In the Sort By section, select Rank from the drop-down list.
- Click Done.