Jump to content

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

Recommended Posts

Hi gang,

I am trying to make a calculation field that will show initials. If a record has a single person, its easy, I just use the left function for the first name and last name. The problem I have is the record has 2 people Only the first name field is populated with an &. for example Terry & Archie. so I tried the following calc. It doesn't work, it only shows "T". What am I missing? why doesn't this work? It is probably something obvious but it is driving me nuts.

Case(

PatternCount ( Splicer::Name First ; "&" );

Left (Splicer::Name First; 1 )

&

Left (RightWords (Splicer::Name First ; 1 ); 1 );

Left (Splicer::Name First; 1 )

&

Left (Splicer::Name Last; 1 )

)

Thanks in advance

Link to comment
Share on other sites

Case(

PatternCount ( Splicer::Name First ; "&" );

Left (Splicer::Name First; 1 )

&

Left (RightWords (Splicer::Name First ; 1 ); 1 );

Left (Splicer::Name First; 1 )

&

Left (Splicer::Name Last; 1 )

)

Shouldn't this be:

Case(

PatternCount ( Splicer::Name First ; "&" );

Left (Splicer::Name First; 1 )

&

Left (RightWords (Splicer::Name First ; 1 ); 1 );

Left (Splicer::Name First; 1 ))

&

Left (Splicer::Name Last; 1 )

You included too much in the case.

Link to comment
Share on other sites

Thanks for responding Ralph,

it was all included in the case because if the first name includes "&", then the last name will be empty. But I tried your revised calc and I got nothing in the field, with mine I only get the T.

Link to comment
Share on other sites

This topic is 6673 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.