I am struggling with two simple text functions on a form. I have 4 fields:
Fullname and Sortfield are calculated from the other two, and are marked as ReadOnly on the form. Whenever FirstName and/or LastName are updated, I want to update the other fields as follows:
FullName = FirstName + space + LastName
SortField = first 3 letters of LastName in caps, followed by first 3 letters of FirstName in lower case. No spaces, no punctuation. Spaces can be used only if there are no more letters in the field.
For example: First name is “St. John”, Last name is “O’Brien”, SortField becomes “OBRstj” and FullName becomes “St. John O’Brien”.
Simple enough, but I can’t figure out which text functions to use to strip out the unwanted characters, and I have no idea which insertion points to use on the form.
Any help or suggestions would be most welcome. I can use StringTheory functions if that makes it any easier. I know exactly how to do this in Visual Basic, but not in Clarion. An example would help me greatly.