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

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

Recommended Posts

  • Newbies
Posted

I've imported an old dbase (DOS) mailing list database into FM5. The file imports fine, but I have one field called "citystate" inherited from the original containing, as you might imagine, both the city and the state. Is there an automated way to separate this data? The FM5 Help menu or printed documentation don't appear to readily address this issue. crazy.gif" border="0

  • Newbies
Posted

To further clarify how this data appears in the "citystate" field, I think I should note that the "city..." is separated from the "...state" by a comma and space. An example would be: New York, NY. Again, is there a way to separate this into two fields? I'd like the first field to be "city" and the second to be "state". I could then add the comma and space in a layout if I need to make labels or something of that nature.

Thanks for your attention. crazy.gif" border="0

Posted

Create this script, run it once, then you can delete it:

Show All Records

Go to Record/Request/Page[First]

Loop

Set Field["city",Left(citystate,(Position(citystate,", ",1,1)-1))]

Set Field["state",Middle(citystate,(Position(citystate,", ",1,1)+2),2)]

Go To Record/Request/Page[Exit After Last, Next]

End Loop

Oh and double check the results to make sure none of the records have any wierd stuff in it.

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