Hi,
I started with ListSort and it was not working correctly because of decimal value and SortRecordList will work when both fields need to sorted in ascending or descending. I came up lot of hacks to this but none are true solution for example I ended up using converting the two value (1 as amount and 2 as length ) to a string with below expression and make isAsending as false in ListSort
FormatText(FormatDecimal(Amount,5,".",""),30,30,True,"0")+"|"+(9999999-Length)
As you can see here these value have upper bound but those upper bound are large enough for me to confidently say that it works for my usecase. I was just curious what if I had multiple amounts and various other datatype then I might end up with complex expression just so that it can sort properly and this will be unnecessary data prep operation before sort.
It looks like this is the only way as of now
Regards.