Jump to content

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

Recommended Posts

Posted

Hi

My previous Filemaker person had the company put names in a field with the first name on one line and the lastname after a paragraph return. I would like to automate removing that paragraph return so the full name could be on one line. Can someone tell me how to set that field.

Thanks

Stan

Posted

You could use the Substitute function to substitute the paragraph symbol with a space. Either make a calc field (if this will be ongoing) or (if it's a one-time fix) make a text field and replace-with-calc into it:

Substitute (NameField, "PP", " ")

(where PP is the paragraph symbol).

This is assuming that these are true Filemaker hard returns, as opposed to Mac/DOS/Unix line breaks. If the latter, you will probably have to export the data as a text file and do a search'n'replace with a text editor, then import it back in.

Steve Brown

Posted

But it is usually much better to put them in their own separate fields. You could create a first name and last name field, then do a calculaled replace operation to put the data into FirstName and LastName. Assuming you have only simple first name, lastname values in FullName:

replace (firstName, leftwords[Fullname,1))

replace (lastname, rightwords[fullname,1))

Posted

It *is* better to put the names in separate fields. But being able to do this as easily as your (I'm responding to BruceR) two replaces requires that the names be simple indeed. I once spent several weeks parsing out names into fields. Here are some examples that would fail:

Steve P. Brown

S. Patrick Brown

S.P. Brown

Steve Brown, Jr.

Steve von Brown

Stephen "Steve" Brown

Mr. Steve Brown

What I did was run a find on the most obvious first, i.e., fields contraining only two words, then do a double replace as you suggested. I would set a flag field so I'd know that batcvh was done. Then I'd look at the data for the next variation (hunting for a period as a text string, in records with three words in the field). I'd deal with those, and set the flag. Eventually I'd look at the original data with done flag omitted to see what kind of odd names remained & start dealing with groups that suggest themselves.

Steve Brown

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