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

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

Recommended Posts

Posted

Hi,

I am trying to tidy up the records that I have imported from a Inmagic library database into my own FM database, but as the file formats are quite different it has been a difficult process.

In one of the keyword fields I have noticed that the spaces between many words have been removed so that I have entries like "OperaClassical" or "AfghanWorldMusic" which makes it difficult to use this field for searching. Is there a way that I could use a script to loop through the records and put a space before any capital letters (except the first one) to separate the words?

Thanks.

Posted

Try this:

1. Define a calculation field NewText (result is text) =

Trim (

Substitute ( OldText ;

[ "A" ; " A" ] ;

[ "B" ; " B" ] ;

[ "C" ; " C" ] ;

...

[ "Z" ; " Z" ]

)

)

2. Check the results.

3. Change NewText into a regular (not calculation) text field.

4. Delete the OldText field.

Posted

If the file is a Text Document that you are importing, you can fix this using TextWrangler (its free, and avail at Bare Bones Software site), by using a Grep Pattern Find and Replace of before you import it:

Find:

([a-z])([A-Z])

Replace:

1 2

NOTE, there is a space between the 1 and 2.

As fast as things are changing with FileMaker's abilities, I still like to fix the files prior to importing using a Text Editor with the Grep Pattern capabilities.

HTH

Lee

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