This is a copy / Paste from the Filemaker help book: (can be found as a pdf on the filemaker site)
Returns numberOfCharacters in text, counting from the left.
text - any text expression or text field
numberOfCharacters - any numeric expression or field containing a number
Data type returned
FileMaker Pro 6.0 or earlier
FILEMAKER FUNCTIONS REFERENCE
Left(“Manufacturing”;4) returns Manu.
Left(Name;Position(Name;“ “;1;1)) returns Sophie, when the Name field contains Sophie
Left(PostalCode;3) & Upper(Left(LastName;4)) returns 481JOHN when the
PostalCode field contains 48187 and LastName contains Johnson.
So for you, your TM-ID should be a field that has an auto enter calculation of:
Left ( APPT ID ; 6 )
I prefer to keep serial number fields like APPTID a pure number if they are used in relationships to other tables. Any leading characters that add "meaning" or a format (such as leading zeroes) to the number, I put in a different field and don't, except for very specific reasons, use those characters as part of a primary key used in relationships. Any time I need to combine the leading text and the number, I can either use a calculation to combine them or I can put them on a layout as merge fields placed side by side so that they display as a single field.
When you include content intended to provide meaning to the user in a primary key, you open the door at least by a tiny bit, that you might be required to change this content in the future and making such a change can be tricky and time consuming, and completely avoidable when you stickwith pure serial numbers for your field.
In your case, if you keep the leading characters in a separate field, it's directly available to any calculations that need to access these characters.