Support Article
Inconsistency in the sorting functionality of Work Objects by ID
SA-4065
Summary
Work objects IDs are sorted as text strings. As a result, sorting by ID in ascending order will list "IN-186454" before "IN-189", for example. This makes it difficult for application users to sort reports in a meaningful way.
Error Messages
Not Applicable
Steps to Reproduce
- Log in to the Pega user portal.
- Click the Workbaskets tab.
- Select a workbasket.
- Click the column name Exception ID to sort them.
Root Cause
Work objects IDs are sorted as text strings. As a result, the numeric part of the ID does not determine the sort order (as it should).
Resolution
There are two rules that have to be defined and implemented into the desired report:
- Define a Function Alias
- Define a Control
Define a Function Alias to return the numeric part of the ID as an integer.
Define a control to add back the prefix of the ID ("E-" in this example).
Use these in the report column instead of the ID property.
Published January 19, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.