Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Solution: parse names

Description: I've searched through the forums (honestly) but can't find the script to parse an imported file with names such as

BAKER, ANGELA W. & CARL

BARBER, JOE

into

Angela & Joe Baker

Joe Barber

Case conversion would be a wonderful bonus but I am desperate for the name parse.

Working Under:

Solution Status: Finished

Pre-requisites:

Author(s): Joe Harkins

Date: 12/21/07

Credits:

Instructions / Other Info:

Disclaimer:

FM Forums does not endorse or warrantee these files are fit for any particular purpose. Do not post or distribute files without written approval from the copyright owner. All files are deemed public domain unless otherwise indictated. Please backup every file that you intend to modify.

Your question is pretty unclear, Joe.

First of all, you provide a list of only two names and you don't say whether the rest of the names you will be importing are all formatted like one or other of the examples.

Second, we are probably meant to assume that the two lines in your example refer to the contents of a name field in two separate records, but you don't actually say this.

Thirdly, the subtext to your post refers to FileMaker 6, but the sidebar says you are using Dev7. If you really need to do this in v6 it would be appropriate to draw attention to the fact in your question - especially since the code for v6 will be quite different from v7 (and because v6 is five years out of date...).

And that is not including the fact that you seem to be asking for a Joe Baker in the results, but there is no Joe Baker in the example import text you've provided. Perhaps we are to guess that you meant Carl Baker?

If you are hoping folk will go out of their way to help you, it might not hurt if you were to provide enough information to ensure your question will be interpreted accurately. :wink2:

  • Author

Sorry my post confused you.

  • Author

BTW - In searching through things here I was amused to see that someone has posted a tip for creating multiple layered and tabbed fields under their own name as if they created it. I published that about 12 years ago in a long defunct FileMaker Pro newsletter.

I imagine what you are looking for is a calc formula along the lines of:

[color:blue]Proper(

LeftWords(

Right(NameField, Length(NameField) - Position(NameField, ", ", 1, 1) - 1), 1)) &

If(Position(NameField, "& ", 1, 1), " & " &

Proper(

LeftWords(

Right(NameField, Length(NameField) - Position(NameField, "& ", 1, 1) - 1), 1)) & " ", " ") &

Proper(

Left(NameField, Position(NameField, ", ", 1, 1) - 1))

...where the original field the names are imported into is called NameField.

  • Author

Thank you. I'll give that a try.

BTW - If you are a jazz fan, as so many Aussie are, keep your eye open for John Harkins, one of my sons. He lives in Manly but plays at all the jazz festivals and tours with other performers too. He also plays Melbourne a few times a year.

Thanks again for your help.

  • Author

Sorry, it's been so long since I've used FM - and scripting was never a strong point - I'm missing something that is probably pretty obvious . . .

I have a Excel file with the field, Owner, that contains the text to be parsed when imported into the FM solution.

Also, I have a field, in the FM solution, called OwnerName, into which I intend to import the owner name and want it parsed as discussed.

And I have created a new text field, NameField into which the results of the calculation on OwnerName willbe placed.

Question: Do I make OwnerName the calculated field? Importing into it will result in parsing its content into NameField?

But, I can't do that because OwnerName cannot be imported into. As a calc field it is grayed out in the import dialog.

Sorry for being so dense. What am I doing wrong?

Edited by Guest

Joe

You import the name into a text field and the calculated field will produced the results you want.

  • Author

So, in the above scenario,

OwnerName is the text field into which I import

NameField is the results field (also text)

What field is defined as the calculated field?

And what causes the calculations to launch? I don't understand how simply importing text from an extranal file into OwnerName would launch the calculations and cause it to put the result in Name Filed. Wouldn't that require a script?

  • Author

OK, your answer left out the DUH factor (Dumb User Handicap) that applies to me.

I went back and read the responses much more carefully (OK, I read them carefully for the first time), created an import-dedicated calculated field called CalcField, imported the external into NameField and it worked beautifully.

I really appreciate the excellent help!

i'd like to play with the calc so I can learn. Which part of the above calc converts the FULL CAPS to Initial Caps?

I'd like to learn how to write the calc to convert the other parts of the address (Street, City, State and Zip) to Initial Caps.

Edited by Guest

The function called "Proper" will capital the first Letter of the Word.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.