Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5346 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

  • Newbies
Posted

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!

Posted

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 ;

)

)

  • Newbies
Posted

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

This topic is 5346 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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