Skip to Content
0

Sorting alpha+numeric+random+etc...

Mar 14, 2017 at 07:31 PM

23

avatar image

I have tried the following solution but its not working out for my data.

IF IsNumeric({TableName.TextNum}) = False
THEN "0" & {TableName.TextNum} 
ELSE IF Len({TableName.TextNum}) < 2
THEN "0" & {TableName.TextNum} 
ELSE {TableName.TextNum}

But my data sometimes has alpha, numeric or decimal. This time i have the following values: 1.00, 2.00, 3.00, ..., 11.00, .., 22.00, 23.00

Please help.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Brian Dong Mar 14, 2017 at 08:50 PM
1

Hi Sam,

Try this to assign the leading 0:

If IsNumeric ({Tablename.TextNum}) And ToNumber ({Tablename.TextNum}) < 10 then 
   "0" & {Tablename.TextNum} 
Else {Tablename.TextNum}; 

This should take care of the leading 0 for this example. What could the rest of your look like?

Brian

Share
10 |10000 characters needed characters left characters exceeded