0

I have 4 fields : lastname, firstname, middlename, suffix

I selected TABLE Format. In the Settings tab, I put all fields together in the first column so I can have them together in one row, but I want the display to be:

Jones, John David Jr

instead I can get

Jones John David Jr

or

Jones, John, David, Jr

In other words, the separator is applied between every field, and I want it applied only after the first.

I tried the UNFORMATTED LIST but that didn't provide me with any way to concatenate.

1
  • You can do it by making 3 of the fields hidden and rewriting the 4th one, instead of making them inline. Unfortunately I don't have the time right now to write detailed instructions though. – rooby Feb 11 '16 at 23:33
0

Solution 1:

As @rooby suggested here are the steps you can follow

  1. Add the fields Last Name, First Name, Middle Name and Suffix to the view in the same order
  2. For the first 3 fields Last Name, First Name, Middle Name select the option "Exclude from Display" and save.
  3. In the settings of the field "Suffix" check the option "Rewrite the output of this field" under the section "Rewrite Results".
  4. In the TextArea that gets displayed enter [field_last_name], [field_first_name] [field_middle_name] [field_suffix]

For the exact field names you may click on the link "Replacement Patters" below the text area.

This approach works fine if the Suffix field is a required field and all the records for it. If not the complete value is not displayed if the suffix is empty.

Solution 2:

  1. Add the fields Last Name, First Name, Middle Name and Suffix to the view in the same order
  2. Add "Global: Custom text" field to the view at the bottom of all the fields.
  3. For the fields Last Name, First Name, Middle Name and Suffix select the option "Exclude from Display" and save.
  4. In the settings of the custom text field enter [field_last_name], [field_first_name] [field_middle_name] [field_suffix] under "Text" and save
  5. Look at the replacement patterns for the exact field names in your system

This approach works fine even if there are empty values for any of the fields.

1
  • I do, however, get an error 'Display "Master" uses fields but there are none defined for it or all are excluded" which is not true because the "Global: Custom text" field (named "Full name, last first") is present. There was no error message after I saved it though. – TdeV Feb 12 '16 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.