Solved Hi, I am trying to Concatenate 2 fields but I am not getting the desired result. (1 Viewer)

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:54
Joined
Feb 19, 2002
Messages
43,266
I know you marked this as solved but I'd like to add a comment. You said you wanted to use this concatenated field for sorting. All of the confusion above was caused by not understanding the difference between numbers and strings. In your situation, you should just sort by the raw numbers. Concatenating them into a string requires you to fix the width of each part so you can add the appropriate number of leading zeros and that will absolutely cause you trouble at some point assuming you ever have a number of more than four digits. Sorting the raw numbers won't cause a problem.

And let me reiterate the earlier advice - take the format off the autonumber. You are making it "look" like a string but it is not a string. It is a number and numbers do not have leading zeros.
 

Users who are viewing this thread

Top Bottom