- WSIguyAsked on March 28, 2018 at 11:02 PM
I am having problem with conditional calculations.
I have a simple order form.
I want to condition it such that delivery charge is as follows.
Total order (before tax) under 5000 Yen, = 3,500 delivery charge
Total order (before tax) under 10,000 Yen = 2,500 delivery charge
Total order (before tax) 10,000 or more = FREE
My conditions are not working.
It would be nice also if there was an ElseIf function within the conditionals.
ALSO, how can I make my number fields no decimal points (Japanese Yen does not have cents).
I would like the Sales Tax to render with no decimal places, and of course, the totals that come below it also to render without zero (0) decimal places.
I though I configured this for other fields, but I can't recall how.
- JotForm SupportNik_CAnswered on March 29, 2018 at 06:14 AM
I checked this issue and I was able to replicate it.
Please allow me some time to test it more and I will get back to you once I find the cause.
Thank you for your patience.
- JotForm SupportNik_CAnswered on March 29, 2018 at 03:53 PM
Thank you for your patience.
The issue was that comma separate function was used in Order Amount field:
So if you remove it, it will work fine:
You can check my test form as well: https://form.jotform.com/80876434895978
I'll get back to you regarding the decimals.
- WSIguyAnswered on March 30, 2018 at 12:07 AM
Thank you for that, Nic!
So, I guess the work around to keep the commas in the presentation is to create a calc field with no formatting and hide it.
Use that for the calculations and conditions, but use another field simply to display the sub-total on the form.
Well, I have done that and it works.
Looking forward to solving the decimal places matter.
One other thing, I am using a Yen sign (￥) to display the numbers.
I think (is this correct), I would have that as "string" (light brown). However, I often find that in calculations, when I return to edit, it has often reverted to a "number" (dark gray).
- WSIguyAnswered on March 30, 2018 at 12:47 AM
I figured out the decimal place matter. After clicking the ... to get calculation options, there is an options tab where you can select the # of decimal places.
- JotForm SupportNik_CAnswered on March 30, 2018 at 01:57 AM
I'm glad you were able to make it work.
Yes, you could set zero for decimal places. I was checking that as well, but I had an inconsistent result. I checked your form and I see it works fine.
So, good job!
Let us know if you have any further questions.
- WSIguyAnswered on March 30, 2018 at 03:29 AM
I found that I had to change the Total Order fields to the specific/hidden Calculation field for all calculation fields in order for everything to work.
It is odd that THAT is the only field (with Comma formatting) that messed up our conditions and calculations.
But, at least we solved it.