Column Sorting Is Not Working as Expected for a Custom Calculated Attribute
search cancel

Column Sorting Is Not Working as Expected for a Custom Calculated Attribute

book

Article ID: 189475

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

When trying to sort a column based on a custom lookup attribute, the order obtained is not the expected.

For example, with 3 values, such as 145, 232, 24, the expected order (sort ascending) is 24, 145, 232. However, the obtained result is 145, 232, 24.

Cause

The lookup is based in a 'Lookup - String', instead of a 'Lookup - Number', therefore, although the values appear to be just numbers, they will be alphabetically sorted (not numerically sorted).

The same way that these three words would be alphabetically ordered: east, Ed, eel; these three numbers are alphabetically ordered as well: 145, 232, 24.

Resolution

Create a lookup attribute that is based in a 'Lookup - Number' instead of a 'Lookup - String' if the attribute only contains numbers.