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.

Flag for "non-approved" characters

Featured Replies

I'm looking for a calculation to use as a flag for any letters/characters that aren't approved for use in a spefic field; the approved characters are: dMmy/.-  ...and those characters can appear in any order and in any number...so that negates using PatternCount unless I make a multi-line case statement using PatternCount for each approved character, but that sounds klunky. I also tried using Filter as part of an equation but I couldn't get it to work.

Your help would be appreciated. Thanks!

You can use filter, but you'll need to compare it to the original string to see if there's a difference. In the filter function, you specify all the characters you allow. You can compare the result of the filter function to see if any characters have been removed.

like so: If( string = filter( string; "dMm/.-" ); "ok"; "not ok" )

Hi TeacherED,

Try

Substitute (   YourTextField ;   ["d"; ""];   ["M"; ""];   ["m"; ""];   ["y"; ""];   ["/"; ""];   ["."; ""];   ["-"; ""] )

HTH

Lee

TeacherEd, try

Let(
~finder = Substitute (   YourTextField ;   ["d"; "§"];   ["M"; "§"];   ["m"; "§"];   ["y"; "§"];   ["/"; "§"];   ["."; "§"];   ["-"; "§"] ); 
If(length(YourTextField) > PatternCount(~finder; "§"); "Error Message"; YourTextField)
)

§ is option-5 on a Mac; you can use any character you are certain will not appear in YourTextField.

Edited by doughemi

  • Author

Great stuff! Thank you all for your help!

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.