January 7, 201610 yr I am using a calculation field to combine first and last name. The calculation (First Name & " " & Last Name) works fine when the last name contains no blanks or hyphens. When the last name contains a space or hyphen between two words, such as in "De Liban" or "De-Liban", the calculation drops everything after the space or hyphen. What can be done about this besides the obvious of not using spaces or hyphens in the last name? Thanks everyone. Linda
January 7, 201610 yr The calculation you have presented has no problem with hyphens or spaces in the last name. So something is missing here.
January 7, 201610 yr To expand on Bruce's reply - that calculation, as shown, will not behave as described. It will definitely put the First Name and Last Name together in full. I suspect this is to do with the display of the results afterwards - attached is the result of that calculation, displayed in three different ways on a layout. The middle one still has the full text, but it is cut off by the size of the field. A more esoteric possibility may be that the calculation also has some form of LeftWords calculation applied to it.
January 8, 201610 yr Make sure the result is "text" not "number" as the hyphen may treat it as a calculation I prefer, this method. Trim ( Substitute ( List ( Trim (GetValue ( FirstName; 1) ) ; Trim ( GetValue (LastName;1) ) ) ; "¶" ; " " ) ) Ensures you only get the first line of text from each field and removes trailing spaces and then only ads a space if both names are present.
January 8, 201610 yr 5 hours ago, Ocean West said: Make sure the result is "text" not "number" as the hyphen may treat it as a calculation No, that is not possible. A text character will never be treated as an operator, unless you coerce the text to become a formula by passing it as the parameter to the Evaluate() function.
Create an account or sign in to comment