Support Article

Inconsistency in the sorting functionality of Work Objects by ID



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

  1. Log in to the Pega user portal.
  2. Click the Workbaskets tab.
  3. Select a workbasket.
  4. 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).


There are two rules that have to be defined and implemented into the desired report:
  • Define a Function Alias
  • Define a Control
Perform the following local change:

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

40% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.