Jump to content
Server Maintenance This Week. ×

Picking specific data from fields


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

Recommended Posts

  • Newbies

This is a little odd. I'm trying to integrate an old mailing list into a new one, but the people who maintained this list didn't stick to a standard. I have the following fields for a contact:

"FirstName" - Betty

"LastName" - Smith

"FullName" (this is for mailing labels and if there's more than one person) - Betty Smith

"Salutation" (for form letters-this field automatically copies the first name) - Betty

"Organization" (for company names)

But the old list is as follows:

"LastName" (they also used this for company names) - Smith

"FullName" (they just threw in the first name here) - Betty Smith

"Salutation" (sometimes they used this...sometimes not)

I want pull the first name out of the "FullName" field and put it into a new "FirstName" field. How can I do that?

Link to comment
Share on other sites

Calculation:

If (

PatternCount (

Trim ( FullName ) ;

" "

) = 1 ;

LeftWords ( FullName ; 1 ) ;

If (

PatternCount (

Trim ( FullName ) ;

Trim ( LastName )

) = 1 ;

Trim (

Sustitute ( FullName ; LastName ; "" )

) ;

"SpecialCase"

)

)

Checks for more than one space between words in FullName, or LastName not appearing in FullName, and in either case returns "SpecialCase" so you can search for that value and address those records individually. If LastName appears in FullName, the calc returns FullName minus LastName and extra spaces. If only one space appears in FullName between words, returns the first word (assumed to be the first name).

Link to comment
Share on other sites

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