5 Replies Latest reply on Nov 13, 2012 3:06 PM by flusheddata

    How to make a calculation result default to zero if negative?

    dustyhanes

      Hello all,

       

      I would like some guidance on how to prevent a result in a calculation from being a negative number. I'm working on an inventory on hand field and I don't want the result to be able to show a negative quantity. I want it to stop at zero, or default to zero if result is less than zero.

       

      An important note: If the result is negative, I want it to not only just show as zero, but I want it to think the result is actually zero. By this I mean if I remove an inventory item and the total quantity on hand would be -25, I don't want it to show as 0 but then act is further calculations as if it's still -25. Because then if I received 100, it would show 75 and that wouldn't be accurate. I would want it to default to zero and then act as zero in the calculation, showing a result of 100 after receiving.

       

      Hopefully this made sense. I've played around with some functions, but I figured I'd seek some advice here. Thanks so much!