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 zipcode from text field

Featured Replies

What sort of calculation can i use to check if the last WORD (rightword, 1) of a text field, is made up of just numbers.

This is to be used to extract zipcodes from address lines.

Generally, the address line field runs as follows:

add1, add2, city, state zip

but on occasions, the zip and state are reversed, or the country has also been added to the end. I therefore need to be able to check if the last word (or indeed whatever selection of text i pull out) contains just numbers - if so I can therefore identify it as a zipcode and copy it off into another field.

Hi, mikeyt!

Can you attach part of your file here for showing how it looks?

  • Author

I've actually found a workaround now, by just checking if the first character of the words are numerical, but i would still be interested to know if there is way to check if a text range is numerical, or alphabetical.

No file as such, but example of some text fields below

411 East Palm Canyon Drive, Palm Springs, California 92264

Olive Avenue, Rehoboth Beach, Delaware 19971

125 Canyon Circle Drive, Sedona, Arizona 86351, USA

10529 Main Street, Clarence, New York 14031–1684

So, if i set up a field to extract the last word bu calculation, is there a way to check if that last word is made up entirely out of numericals (0123456789) or if it is alphabetical characters, bearing in mid that it may not have a fixed width (ie not always 5 characters)

Try:

Let (

word = RightWords ( Address ; 1 )

;

Exact ( word ; Filter ( word ; "0123456789" ) )

)

  • Author

Perfect - thanks ever so much, it works.

Never used LET function before, but it is very interesting what you can do with it.

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.