HKJ
November 26th, 2007, 10:10 AM
I am trying to dynamicaly sort by taking in a parameter field (which column to sort by -- which could be a string column or a number column). I also have a formula created with an if else loop where each condition returns the actual column name in the database. We have both numeric and string columns how do we handle this since if else condition should either all return strings or numbers.
jggtz
November 26th, 2007, 11:55 AM
Convert numbers to strings, using the function 'ToText'
HKJ
November 26th, 2007, 09:50 PM
I did that already and that causes the sort to be incorrect. For instance, if i have values such as 10,100,88,800.
It will sort as follows: 100,10,800,88 as oppose to 10,88,100,800.
Any other suggestions?
JaganEllis
November 26th, 2007, 10:25 PM
left pad the to_text'd numbers with 'n' 0s and take the rightmost 'n' characters.
HKJ
November 27th, 2007, 11:07 AM
Thank You!!!! =)