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 whole number entry

Featured Replies

This doesn't fall into the "complex calculations" category, but I didn't see a forum for "easy calculations." Here goes...

We have an item which is sold in sets of 25 only. I want to validate the quantity field to allow entry only in those multiples. It's probably something like If(Mod (order_quantity, 25)≠X,1,0). With X being anything but a whole number. It's expressing that correctly that has me stuck.

Thanks!

Ummm well this works (enter this whole string in the validation calc box)???

quantity = Ceiling ( quantity / 25 ) * 25

Edited by Guest

Quite possibly, thinking outside the box, is this something that can be resolved with a value list? How many sets of (25) might someone order?

The calculation may be in the units ordered, not in the order process.

More info needed, after all, what are you seliing? Sometimes you need to think backwards instead of forwards, if that makes sense.

Edited by Guest

Taking the scenic route? How about:

not Mod ( Quantity , 25 )

  • Author

This is for a runtime (Dev 6) so I'm not familiar with the Ceiling funtion. I'm guessing that's new in 7 or 8?

As for the value list, I'm afraid that could become quite long.

not Mod (Quantity, 25) is simple, elegant and works perfectly!

Thanks so much for everyone's 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.