Dagel Posted July 12, 2006 Posted July 12, 2006 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!
LaRetta Posted July 12, 2006 Posted July 12, 2006 (edited) Ummm well this works (enter this whole string in the validation calc box) quantity = Ceiling ( quantity / 25 ) * 25 Edited July 12, 2006 by Guest
macmangler Posted July 12, 2006 Posted July 12, 2006 (edited) 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 July 12, 2006 by Guest
comment Posted July 12, 2006 Posted July 12, 2006 Taking the scenic route? How about: not Mod ( Quantity , 25 )
Dagel Posted July 12, 2006 Author Posted July 12, 2006 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!
Recommended Posts
This topic is 6708 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now