May 25, 201015 yr Newbies Good day. I have searched for an answer to my question, but have come up short. I'm a novice FileMaker user and am trying to create a name calculation field. The calculation is composed of four fields: 1. First_Name 2. Last_Name 3. Alt_First_Name 4. Alt_Last_Name I'm trying to present names so that you get something like: If only one person is listed, it lists: First_Name Last_Name If two people are listed with the same name: First_Name "and" Alt_First_Name Last_Name If two people are listed with different last names: First_Name Last_Name "and" Alt_First_Name Alt_Last_Name So far my calculation is: If (Last_Name=Alt_Last_Name; First_Name & " and " & Alt_First_Name & " " & Last_Name; First_Name & " " & Last_Name & " and " & Alt_First_Name & " " & Alt_Last_Name) But it doesn't seem to work right. I always get an "and" even with one person listed, but no second person; otherwise it works. Any help is much appreciated! Thanks, Henry
May 25, 201015 yr Hi, Need some more explanation - if there is 2 persons: you want to see both to choose witch one? Probably you can use portal Edited May 25, 201015 yr by Guest
May 25, 201015 yr Author Newbies Thanks for your reply. Basically: John Doe (one person) John and Jane Doe (two people with the same last name) John Doe and Jane Smith (two people with different last names) Thanks!
May 25, 201015 yr Hi try this: Let([ A = ValueCount ( List ( First_Name ; Last_Name ) ) ; B = ValueCount ( List ( Alt_First_Name ; Alt_Last_Name ) ) ]; Case( A + B = 4 and Last_Name = Alt_Last_Name ; First_Name & " and " & Alt_First_Name & " " & Last_Name ; A + B = 4 ; First_Name & " " & Last_Name & " and " & Alt_First_Name & " " & Alt_Last_Name ; A = 2 ; First_Name & " " & Last_Name ; B = 2 ; Alt_First_Name & " " & Alt_Last_Name ; ) )
June 2, 201015 yr Author Newbies That worked perfectly! Thank you so much. I have a lot to learn and try to solve these things on my own, but really appreciate the help. Sincerely, Henry
Create an account or sign in to comment