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.

How to code if character is alpha or numeric?

Featured Replies

I need to look at the last character of a field and know whether it is alpha or numeric. Can anyone help me out on this?

This calculation will give you a 0 if it is Alpha, and 1 if it is numeric.

GetAsBoolean ( Right ( YourField ; 1 ) )

Lee

  • Author

perfect, just what I needed! Thank you!

Well, not really - that is if you consider zero to be a numeric character. Try instead:

IsEmpty ( Filter ( Right ( Yourfield ; 1 ) ; "0123456789" ) )

Hi comment,

Good catch. I tested it on every thing except a zero in the last position.

Can you possibly explain to me why FileMaker will filter it out as numeric, but not see it as numeric?

Lee

Edited by Guest

Filter() is a text function - you can put any characters into the filterText parameter, and Filemaker will use them without considering any other meaning they might have in another context. The fact that Filter ( text ; "0123456789" ) leaves only numeric characters is pure coincidence as far as the Filter() function is concerned.

OTOH, GetAsBoolean() is a logical function. It evaluates the data parameter as being either TRUE or FALSE. Zero is evaluated as FALSE, same as empty.

Hi comment,

Oh. Doh. Now I understand why.

Thank you for your explanation, you have once again enlightened me, and it is appreciated.

Lee

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.