"My database is sorting numbers this way: 1 10 12 2 etc. How can I fix that?"
The field you are sorting by isn't a number field, but a text field. Go to fix it.
" I have a script that sets a variable for employee name $emp = "jr". "
Set the $emp to "=jr"
thank you for your response. Yes, one of the fields is a text field. It is part of a conditional value list based on type. There is a type of code named e20, e30 etc. So How can I get it to sort the sections that are numbers only? or can I? I'll have to check on the other field as it should be a number - it is an auto assigned number.
"There is a type of code named e20, e30 etc."
What etc. stands for ?
( if you have always the "e" before that code, you could create a new calculation field: GetAsNumber ( YourCode ) and sort by it )
etc is the continuation of the number series. Thanks for your help - I'll use that calculation.
You can also just put:
as the sole term of the calculation and specify "number" as the return type to get the same result.
Actually I just realized that I also have a code with a prefix of lo as well.
So the etc. may stand for z10 and, may be, even for zzz10 ?
In the above cases, how would you sort ?