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.

Picking Specific Characters from another field

Featured Replies

If Anyone can help, I'd greatly appreciate it.

I want to make a field calculation. And I want the calculation to look at another field in the same record and take 2 letters out of the name and add numbers to it

example:

"name" field = Adventure Sport

I want the "number" field to read "AS001". I can't find the function to actively select the first letter of each word. Can you help me?

Thanks.

Hi

what if the field contains only a word ?

and if contains more than two ?

BTW: this calculation...

Filter ( Proper ( Lower ( text ) ) ; "ABCDEFGHIJKLMNOPQRSTUVXYWZ" )

... will give you the first letter of each word.

Than you have to keep the first two with:

Left ( Filter ( Proper ( Lower ( text ) ) ; "ABCDEFGHIJKLMNOPQRSTUVXYWZ" ) ; 2 )

... but what you wish if the word is only one ?

If you think to use a fixed char ( like "X" ) than the calculation becomes:

Left ( Filter ( Proper ( Lower ( testo ) & " X" ) ; "ABCDEFGHIJKLMNOPQRSTUVXYWZ" ) ; 2 )

Filter ( Proper ( Lower ( text ) ) ; "ABCDEFGHIJKLMNOPQRSTUVXYWZ" )

Nice.

WOOHOO :chili:

Yes indeed the ingenuity applied here needs an applause!

--sd

:clap: :clap: Well done.

Could someone explain to me the need for the Lower()?

It's a GENERAL method for getting the initials. If you have input that's guaranteed to be in title case, you don't need it. It also might need other adjustments if you're dealing with special cases like names (d'Arcy, Smith-Jones, etc.). But it's a great way to avoid a recursive calc.

Could someone explain to me the need for the Lower()?

Take a omnipresent name here, like LaRetta : , will the R come thru as well, same would McCain give two which would allow both M and C thru.

So by lowering every char first and then Proper( afterwards will only the leading char in each word be capitlaized.

--sd

I would think that Proper(text) would always be the same as Proper(Lower(text)). Is there an example where that isn't true?

In my FM9A Data Viewer,

Proper("LaRetta") returns Laretta.

Proper("McCain") returns Mccain.

Ah! D J's last theorem??

You seems to be right D J!

--sd

Ah. One of those things that are obvious - AFTER someone points them out. Thanks for that.

Could someone explain to me the need for the Lower()?

good point !

No need for Lower, but some needs for other accented chars into the string

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.