Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I know it's simple, but text parsing isn't my thing... Any help would be appreciated. I have three fields, one is City State, and then City and State, I just need it to copy the city into the city, and the state into the state.

Thanks!

Posted

We need to understand a bit more of the data, JT, to find where to split the two. Is State always two-character? Or is there a comma between them (city and state)?

We need something to identify how to handle the following examples:

St. Louis Missori

Charlotte North Carolina

A computer needs to know where to split it by logic or ... if you happen to have a zip code table handy in another cel (field) of each record? I have one I could scare up if you don't. You can then create a relationship using multiline key to help identify potential two-word city from potential two-word state.

Posted (edited)

City would be:

GetValue ( Trim ( Substitute ( yourTextString ; "," ; ¶ ) ) ; 1 )

State would be same but change the 1 to a 2.

UPDATE: Actually, that was sloppy. Trim it last as:

Trim ( GetValue ( Substitute ( text; "," ; ¶ ) ; 1 ) )

Edited by LaRetta
Posted

Okay, I['ll be vague too

I could be as simple as

LeftWords (yourfield ; 1 ) for City RigntWords(yourFieid; 1) for State.

However these will break depending city being one word and state being the last word to the right.

Posted

LOL, JT, you changed the specs. Luckily it should still work if there is always a comma between city and state.

But you can also get city then by: LeftWords ( yourTextString; WordCount ( yourTextString) - 1 ) ... the trim unnecessary

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