Want to sort 14054.0, 14054.1, 14054.2........ 14054.10

but it is sorting as 14054.0, 14054.1, 14054.10, 14054.2

but it is sorting as 14054.0, 14054.1, 14054.10, 14054.2

- 80 Points

Posted 3 months ago

Surya Avantsa, Certified Builder and Expert

- 3,008 Points

Make sure the field is numeric. If it is a text field, that's how it will be sorted.

QuickBaseCoach App Dev./Training, Champion

- 65,320 Points

I understand your questions and will post a response if I can before my plane leaves.

you will need to create field for sorting purposes that looks like this

14054.000

14054.001,

14054.020

14054.100

you will need to create field for sorting purposes that looks like this

14054.000

14054.001,

14054.020

14054.100

Surya Avantsa, Certified Builder and Expert

- 3,008 Points

If you are pretty confident that the field will only contain numbers, then you can change its data type to numeric.

- 80 Points

It will only contain numbers.

I have tried it that way but when I increase the decimal the 14054.1 becomes 14054.10 and I already have a 14054.10 document

I have tried it that way but when I increase the decimal the 14054.1 becomes 14054.10 and I already have a 14054.10 document

Surya Avantsa, Certified Builder and Expert

- 3,008 Points

Numerically speaking, 14054.1 is the same as 14054.10 or 14054.100. The trailing zeroes does not change the value. Now, if you already have the value, and you sort them based on that number, they will appear together. I have another question: What do you mean "14054.10 document?" Can you provide more context?

QuickBaseCoach App Dev./Training, Champion

- 63,962 Points

Marlene has a document numbering system where say the versions are indicated by the suffix.

So the original is version 0, then it counts up to .1, and then .2 and eventually to .10 where 10 is after 2.

So the original is version 0, then it counts up to .1, and then .2 and eventually to .10 where 10 is after 2.

QuickBaseCoach App Dev./Training, Champion

- 65,320 Points

Not tested buy try this as a sort field. You do not need to display it on the report, just sort on it. This is a formula text field type

var text LeftOfDecimal = Left([my field],".");

var text RightOfDecimal = IF(Contains([my field],"."), Right([my field],".");

var text NewRightOfDecimal = Right("000" & $RightOfDecimal,3);

If(Trim([my field]<>"", List(".", $LeftOfDecimal, $NewRightOfDecimal)

If there are any syntax error or problem, please post your code and the error message as this was not tested.

var text LeftOfDecimal = Left([my field],".");

var text RightOfDecimal = IF(Contains([my field],"."), Right([my field],".");

var text NewRightOfDecimal = Right("000" & $RightOfDecimal,3);

If(Trim([my field]<>"", List(".", $LeftOfDecimal, $NewRightOfDecimal)

If there are any syntax error or problem, please post your code and the error message as this was not tested.