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

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

Recommended Posts

Posted (edited)

This is my first posting on FMForums so I don't know what to expect...

My problem is that I have data (being a city name and a county name) in one field that is seperated by a comma. I want to seperate the two from each other and get them in seperate fields. I immediately tried to use first word and last word functions but realized it didn't work--of course the cities are sometimes one or two words as well as the counties. Is there a function that I can use that will recognize the comma in the middle and pull out data respectively? Help!!

Edited by Guest
Posted

You could use a Position function to determine where the comma lies and use the comma as a delimiter, but it is probably easier to substitute a carriage return for the comma and calculate using the Right and LeftValues functions.

City:

Substitute( LeftValues( Substitute( yourField; ", "; ¶ ); 1 ); ¶; "" )

County:

Substitute( RightValues( Substitute( yourField; ", "; ¶ ); 1 ); ¶; "" )

If there is no space after the comma in your field, remove the space following it in the calculations.

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