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.

Formatting Text (Title Case)

Featured Replies

I received such great help with a problem I posted earlier, I'd like to throw one more out there if I may.

When we import records, the text is all "UPPER CASE". Can I tell FM to select a two fields [First_Name] and [Last_Name], then format all text within every record to be "Title Case"?

Thanks in advance,

Kip

OK, can't currently think of a way of making this dynamic, but it does work. So if you only want to change a couple of fields this is one eay.

Write a script called Title Case.

Freeze Window

Allow User Abort [on] (only for testing purposes.

Go to record [first]

Loop

Go to field [First name]

Set field [dont specify a field] Proper("First Name")

Go to field [Last Name]

Set field [dont specify a field] Proper("Last Name")

Go to record [next, exit after last

End Loop

This will make those two fields for all the imported data (or the found set have title case)

Someone may come up with a more dynamic way of doing this.

HTH.

Create a calc field:

Upper(Left(UpperCaseText, 1) & Lower(Middle(UpperCaseText, 2, 100)

Make sure the field is formatted without messing with the upper/lower case settings.

OR...

If all you want is to display the text correctly, in Layout mode, select the field, go to Format/Text and format it as Title Case.

See,

I knew dan would come up with something. But then Dan why not create a calc field for each field.

Proper(fieldname).

I just took it that he wanted to change the contents of the actual fields, as opposed to creating additional fields.

  • Author

Thanks Guys! I'll give it a try!

[ March 26, 2002, 02:42 PM: Message edited by: Kip Troendle ]

You could also use the Replace command, FWIW. In a script it would be:

Replace (No dialog, First Name, Proper(First Name))

Replace (No dialog, Last Name, Proper(Last Name))

Of course, with names like McDonald or MacDonald, you'd need to work a little harder... Take a look here for starters.

I would use the Proper(Text) command here, too. But I would just use the SetField, and not GoToField step. Dealing with the Mc problem is quite easy too.:

--------------------------------------------------

SetField First_Name

Proper(First_Name)

SetField Last_Name

Proper(Last_Name)

If

Left (Last_Name,2) <> “Mc”]

Exit Script

Else

SetField Last_Name

Left( Name1, 2) & Upper(Middle( Name1, 3, 1)) & Middle( Name1, 4, Length(Name1) - 3)

End If

--------------------------------------------------

Of course you can loop this to deal with the current found count, or if you want use a replace, which is, in itself, faster, but here you would have to replace at least twice. I would consider developing this a bit further, once you’ve got your DB in order, and using it as a validation by calculation. That way you can avoid people messing things up again, as FMP will not allow them to enter data in an incorrect manner.

Hope this helps:

Rigsby

PS: If you loop this, you will have to change the exit script part:

If

Left (Last_Name,2) <> “Mc”]

Exit Script

However, the reason I did it this way is to avoid “mc ally” for example becoming “McAlly” instead of “Mc Ally”.

But you can simply change the Exit Script, to Go to next record.

Rigsby

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.