What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Form Calculation: Turn negative result to zeroAsked by fincalosbalcones on April 26, 2014 at 04:58 PM
Qué función matemática puedo usar en un campo calculado en una forma de cálculo para que si el el resultado es negativo la función lo cambie a cero.
What mathematical function can be used in a calculated field in a calculation form (Widget) so that if the result is negative the function change it to zero.
I will appreciate your help.
calculation form style size font
We do not have this function available in the calculation wizard. Let me add this as a feature request as I find it useful. Hopefully our developer will be able to consider this in the future implementation.
As for now, what you can do is to take your form source code and apply custom script that turns negative result to zero. If you need assistance with this, let us know and we'd be happy to provide you a walkthrough.
Thanks a lot for your quickly respond, I would like apply script that turn negative results to zero in some calculation fields in my forms. I will really appreciate your support.
You can also use the Math function max() -- it has a parameter like this max(0, n).
Using max() the negative number can be round-up to zero(0).
Test this form http://form.jotform.me/form/41159141656454? , make the result negative by subtracting 2nd number as higher than 1st number like this
In my test form, the condition I setup is like this
Please tell us if this will work on what you need and we will also assist you apply this on your form.