Skip to Content
avatar image
Former Member

Sorting alpha+numeric+random+etc...

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 14, 2017 at 08:50 PM

    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

    Add comment
    10|10000 characters needed characters exceeded