Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted (edited)

My guess is that this is a fairly straight forward issue, but I have little (if any) experience with text functions. Any help would be greatly appreciated. I have a license database with a name field (individual) that over the years has had extra data added on many, but not all occurrences. Often the field will contain the company name as well:

john smith / ABC plumbing company

In all occurrences, the individual name is separated from the company name with / -- My goal is to loop through the fields, find the / and everything after and populate a new field, say (companyname)

Then, go through and delete the / and everything after.

Suggestions?

Edited by Lee Smith
changed text size to readable.
Posted

Please attach an actual sample of the text. Often there are keys that we can see to simplify the process.

Posted

Here are three examples:

Abner, David / David Abner Electric

Michael Adams / KVK Inc

Asbury, Ed / Larson Const.

Posted

Try this (in this order):


name = Substitute ( name ; " / " ; ¶ )

company = GetValue ( name ; 2 )

name = GetValue ( name ; 1 )

Posted

Thanks Jeremy - I get the logic of those steps, but do not know enough about scripting to run the data through. Would I create a loop script, and use a setfield script step?

Posted

I would create two (stored) calculation fields and check the results. If they're fine, change them into Text fields, and check the results again. Then you can delete the original field (if you're sure the results are fine).

  • Like 1
Posted

As long as the last name isn't two words such as Van Damme, plus I noticed that there an inconsistency in your data, i.e. the name can be Last first or First first?

Posted

The suggestion I made should work to split the person name from the company name whether the person's last name is two words or not, presuming that the users have been reliable about using "/" as the delimiter between name and company data. I don't see where Darren mentioned splitting the name into first and last name. If that's part of the goal, though, it looks like we can tell the difference between "first last" and "last, first" format by the presence of a comma in the name (trapping for exceptions like suffixes). When the format is "last, first", we can use a similar trick to separate them. When the format is "first last," the system would just have to guess, since we can't tell the difference between two-word first names ("Mary Jane") and two-word last names ("Van Damme") based on the content alone. We could make the splitting more intelligent by referencing a corpus of common first and last names, but whether or not that's worth it depends on how much data there is that would have to be verified or corrected by human users after the parsing.

Posted

we can't tell the difference between two-word first names ("Mary Jane") and two-word last names ("Van Damme") based on the content alone. We could make the splitting more intelligent by referencing a corpus of common first and last names

Jefferson.

Posted

@ Jeremy

The only way that I know of, that does something like this, is an old file from by Lynn Bradford that was originally done in v4 or v5. You can download a copy from this Link

It can probably be improved using today's tools, but I'll let someone else do that.

HTH

Lee

  • 1 month later...
Posted

Update:  problem solved using techniques above.  Created new calc field to replace / with return, created two new fields to grab those return seperated values, converted fields to text after verifying calculations returned correct info.

 

Thanks to all!!

 

Darren

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