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.

Extract upper case words

Featured Replies

  • Newbies

I want to build a Calculation field which will look at another text field and extract (ie return) all upper case words of more than one character length found in the text field, and present the returned words as comma-separated. Eg:

AKYAB, CANARA, COMORIN, INDIA

Can anyone help? I am really stuck on writing the script for finding upper case words

John wink.gif" border="0

A calculation field could be very complicated. A script is much simpler:

code:


Set Field [gIndex,1]

Set Field [WordList, ""]

Loop

Exit Loop If [gIndex > WordCount(MyTextField)]

Set Field [gTestWord, MiddleWords(MyTextField,gIndex,1)]

If [Exact(gTestWord,Upper(gTestWord)) and Length(gTestWord)>1]

Set Field [WordList, WordList & ", " & gTestWord]

End If

Set Field [gIndex,gIndex+1]

End Loop


Field names starting with "g" are globals.

received by email:

quote:

I hope I'm not imposing on you but is there a way of adjusting the script so that it doesn't pick up numerals at the same time as identifying upper case words and ignores duplicates. I've tried for several hours to change the script so it does these things too, but without success. Again, any help you can give is greatly appreciated and if this is asking too much please say.

Regards

John Prescott

This is an example of the present script's result for the text field given below (by the way, I've changed the comma to a space and increased character count to >2) :

ARABIA BURMAH AUSTRALIAN SYDNEY 1863

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.