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

Two questions. I'm not very good with FileMaker calculations...

If I'm givin a tab delimited file containing a field that has someones name as - Doe, John - How do I use a calculation to take that field and and reorder the users names to John, Doe? Also, how would I go about taking that field, and seperating both the last and first names into their own two fields? Not sure what functions to use or how to go about this.

Thanks in advance.

~Daniel

As long as the field always has the comma in it, it's easy:

LastName = Left(InputField;Position(InputField;",";1;1)-1)

FirstName = Middle(InputField; Position(InputField;",";1;1)+1;9999)

So:

FullName = FirstName & " " & LastName

I'd approach this job by creating a small FMP database to act as an import processing file: the tab-delimited data gets imported into the FMP database and get turned into records and fields. Re-ordering the rows then becomes a matter of sorting the records.

Splitting names is always a problem, because not all entries follow the "firstname lastname" format where the first and last names are one word each.

How would you split "Mary Anne Smith" and "Vince De Saul"?

If the name field has only two words then it's easy. But if there are more than two words human intevention will probably be necessary. We can still make a guess and say that the last word is the surname: all the rest is the first name.

LastName = RightWords( namefield ; 1 )

FirstName = LeftWords( namefield ; WordCount( namefield ) - 1 )

I'd make a calc field that counted all the words in the name field, then find all those records with more than 2 words and process them by hand.

  • Author

Thanks for your advice, will your functions work if the field involves a comma? I'll be sure to try this out tomorrow.

  • Author

Thanks for all your help. That worked perfectly. smile.gif

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.