August 26, 200520 yr 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
August 26, 200520 yr 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.
August 26, 200520 yr Author 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.
August 26, 200520 yr Your original calculation should return "TA" for ["Terry & Archie" ; "Bull"], and "TB" for ["Terry" ; "Bull"]. Check your data and your relationships.
August 26, 200520 yr Author Sorry guys, I'm brain dead. I had the fields reversed. Thanks for you help
Create an account or sign in to comment