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.

validate/format data as it is entered

Featured Replies

Hi - part of my database is dealing with input of clinical measurements of vision, specifically lens powers (I'm an optometrist).

The units of lens strength are by convention in 0.25 steps, so lens power goes +0.25, +0.50, +0.75, etc (or the same in minus values). General practise in clinical work is to shorthand these when entering, as (for example) +050, +100, -250, etc. Actual powers are very rarely above +/-20.00, so we would know to read them as +0.50, +1.00, -2.50, etc (rather than +50.00, +100.00, -250.00, etc).

My problem - I need to set up the data entry so that users entering any shorthand versions (such as "050", "+050", "0.50", "0.5", +0.5", "+.5", ".5" or "+0.50") would have it automatically and immediately reformat itself correctly as "+0.50". (The plus or minus sign is important).

I think I could create a 'case' script to go through and process it, but I'm not sure how would be best to implement the script. Would it be best to use a script trigger? (onObjectExit?). Or is there another way that would be better? I expect I'd have to make it a Text field to be able to force the Plus symbol to be shown?

It would be great if I could somehow make it reformat itself wherever it's entered, without having to remember to put a script trigger on wherever it appears, but if I have to then that's okay.

Validation popup windows forcing people to 'just enter it properly' won't be accepted - it needs to be something that works in the background reformatting that shorthand entry into proper format.

Thanks in advance.

  • Author

You're a genius!

Thanks so much. I *knew* there must be a more elegant way of doing it. :laugh:

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.