CDISP9045E

The type of the expression sortBy parameter is type, which is not an ordered type.

The type of an expression in the sortBy parameter must support the < and > operations.
Change the type of the expression to be an ordered type.