Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Concatenating First and Last Name

Featured Replies

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

The calculation you have presented has no problem with hyphens or  spaces in the last name.

So something is missing here.

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.

Screen Shot 2016-01-08 at 8.18.51 am.png

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. 

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.