AnsweredAssumed Answered

Concatenation variables

Question asked by uncleboski on Mar 31, 2017
Latest reply on Mar 31, 2017 by uncleboski

I have been wracking my brain about a text calculation field, “DisplayName,” to concatenate one or two people in a household and whether or not they share the same last name.

 

Name Fields:

  member #1:  NameFirstM1, NameLastM1

  member #2:  NameFirstM2,  NameLastM2

 

1.  If only one member: John Smith and the desired return is:  “John Smith” (w/o quotation marks)

By itself, calc is easy:

  NameFirstM1 & “^” & NameLastM1

 

2.  If there are two members with same last name and the desired return is:  “John & Mary Smith”

By itself, calc would be:

  NameFirstM1 & “^&^” & NameFirstM2 & “^” & NameLastM1

 

3.  If there are two members with different last names and the desired return is:  “John Smith & Bob Jones”

By itself, calc would be:

  NameFirstM1 & “^” & NameLastM1 & “^&^” & NameFirstM2 & “^” NameLastM2

 

Is it possible to do all these in one calculation, or a sequence, a script, or another "best way?"  Searching the concatenation discussions has given me a few ideas, but I'm stumped and welcome any suggestions.  Thanks

Outcomes