Custom Sort for Reports Using "State"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2025 06:33 AM
I'm trying to sort a report using the State field. I need the States in order for a specific catalog item process. Does anyone know how to create a custom sort using States?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2025 12:36 PM
Since state has a field type of "Choice" the choices can have a Sequence value. If the sequence value is present then it will be used to determine the order in which the choices appear. The sequence values are also used as the default sort rule when a list of records is sorted by a choice field.
So to sort the way you want, first make sure that the sequence values for the choices match the sequence you want the records sorted in. For example:
Draft > Sequence: 0
Pending Manager Approval > Sequence: 1
Submitted > Sequence: 2
Accepted > Sequence: 3
If this is set correctly then when you set your default sort by option to the be the choice column for the table it should sort them this way. Keep in mind this is different then the functionality of clicking a column that is not the default sort by in that doing that simply sorts and flips between the A>Z and Z>A sort functions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2025 12:42 PM
Thanks John. Where do I find the sequence for the State choices?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2025 12:49 PM - edited ‎06-05-2025 12:53 PM
Navigate to the table configuration page, you can do this by right clicking any column header if you are looking at the list in the core ui, expanding the configure menu item and then clicking table.
The table configuration will have a list of columns, click the "state" column label to open configuration for the state field. Scroll to the bottom of the column configuration and there should be a tab called "Choices". You can open each choice configuration or if it hasn't been changed for your instance you can simply change the sequence value in-line by double clicking it in the choices list.
Keep in mind for this to work correctly you must assign a sequence to every choice or those without a sequence value may show up first.