Sorting Issue in a repeating grid column Age, Column type as Varchar2 in DB
Hi,
I have a property Age as VarChar2 in Database, we are using a RD to fetch records from DB and showing it on a Repeating Grid UI.
Now the Age is not sorting properly if Age<10 i.e. if there are Ages 1,5,10,20,40,60,45 and i would like to sort them in Ascending order it may show as below
10, 20, 5,40,60,1,45
I know the solution that we can modify the DB column type to Number and it should fix the issue but i want to know of any alternative approach wherein i can make modifications in the RD which resolves the sorting issue.
I read some other articles as well but didn't understood how to use them in my case eg:- https://pdn.pega.com/community/product-support/question/sorting-after-first-character
This is kind of urgent if anyone knows any other approach then please reply.
Thank you
If converting varchar to number datatype, going to solve the issue. Write custom sql method for conversion and add the function in RD