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.

Validating a number field

Featured Replies

Sorry about this because I am sure that it is probably easy for all of you but I need to validate a field and I can't figure out the right way to make it work.

I need to validate it by a calculation that will only let the user input "10" or "20 or "30" or "40" and so on up to "100".

Can someone please help me out with this?

Ron

field > 0 and not Mod( field, 10 ) and field < 101.

If you only have the 10 possible values (10,20,30,etc.) then you might want to validate by value list and make a value list containing the ten values. You could then, as well, provide the user with a pop up list.

  • Author

ok, let me verify what I am trying to do. Things have changed since my original post.

I have a field that I want the users to be able to enter a number between 1-100. This number will be a percent and will be part of a calculation.

Percent x Number = Product

I know how to do the calculation to achieve the Product field.

What I don't know is how I can allow them to enter a whole number 1-100 and then have that be converted to a decimal to muliply correctly without them having to convert it to a decimal and enter it as for ex. .20

You would have to decide wether 15 is 10 or 20, but you'd get an answer here

HTH

if the number is the contents of a field named number, and your user enters a whole number in the percentage field, then the product field is a calculation field...

Product = Percent * Number * .01

Of course, a user might try to enter a percentage such as .56 in which case you must do something. One way would be to prevent the user from entering a percentage by validation... you could validate the percentage field in the options of the define field window... validate by a range of between 1 and 100.

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.