Skip 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.

LAST NAME, FIRST NAME

Featured Replies

First, I am sorry that this is most definitely a repeated topic and probably pretty common, however, I could not find it in this forum or on the internet and had to post the question.

I am stuck with a mailing list that has 13,000 names set up with "Last Name, First Name," which obviously needs to become First Name (Space) Last name with no comma.

This name field contains all of the headaches associated with people's names. Examples as follows:

Smith, Bob

Smith Jr., Bob

Smith-Wesson Jr., Bob

Smith Wesson IV, Bob Peter

 

The good news, is that the list is solid with the respect that the there is only ONE comma. I need to simply reverse this order and delete the comma.

 

Thank you in advance! This is a wonderful community and I wracked my brains on this now for too long and need your help!

 

Mike

 

 

 

Edited by MacFileman
Name Edits

6 minutes ago, MacFileman said:

The good news, is that the list is solid with the respect that the there is only ONE comma.

That is indeed good news. I would suggest you extract the parts into two separate fields. Then you will be able to easily recombine them in any way you wish.

Use =

Left ( FullName ; Position ( FullName ; ", " ; 1 ; 1 ) - 1 )

to extract the last name, and =

Right ( FullName ; Length ( FullName ) - Position ( FullName ;  ", " ; 1 ; 1 ) - 1 )

to extract the first.

 

  • Author

Thanks for the fast response....

 

Ok... the left works well! The right is not working. It does not recognize "LENGTH" and I get an error in my calculation. Not sure what value to place there.

9 minutes ago, MacFileman said:

It does not recognize "LENGTH"

Can we see a screenshot of that?

  • Author

Give me 5 minutes... will post my file. Due to sensitivity, need to remove actual address and I will shorten the list. : )

Your file will not show your mistake (since it won't let you close the calc window). A screen shot will.

  • Author

So the left works perfect... right is now "Can not find field?"

LEFT GOOD.png

RIGHT BAD.png

I changed all "Full name" to "supplied name"

SMH.... I quit filemaker and restarted. YOUR CALCULATION WORKS!

 

 

OMG THANKS!!!!

THIS DOES WORK PERFECTLY!! No idea why it didn't;t work the first time. But I quit the app... walked away, came back and it worked.

 

There should be a highlight on the problematic part. Without seeing that, it's hard to say. You could have picked a gremlin character when copying here. Try typing it in manually. Or go through a text editor that can show invisible characters.

  • Author

I can not thank you enough!!

While I am here though, I am trying to understand the code. I do not do this everyday like you might, but I have done some powerful programs with filmmaker. 

Mostly, I am trying to understand what the 

; 1 ; 1 ) - 1 )

What that means in this calculation at the end here.

You have to parse this like you would a math expression - from the parentheses outward. First you find the position of the comma:

Position ( FullName ;  ", " ; 1 ; 1 )

Then you subtract that from the overall length of the full name to get the count of characters on the right side of the comma. And you have to subtract 1 to account for the space after the comma.

 

Edited by comment

  • Author

WOW! You just made that make sense to me!

I can't thank you enough!

Just an alternative that I've used in similar situations, which I find more readable and understandable:

First Name:

GetValue ( Substitute ( SUPPLIED NAME ; ", " ; "¶" ) ; 2 )

Last Name:

GetValue ( Substitute ( SUPPLIED NAME ; ", " ; "¶" ) ; 1 )

Converting text delimited with a specific string to a list often makes parsing it much easier.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.