Conditions with decimal point values not triggering

  • Profile Image
    missionwestcoopdevelopment
    Asked on November 19, 2021 at 06:33 PM

    Similar to this issue from 2014 (https://www.jotform.com/answers/410447-less-than-or-greater-than-condition-does-not-count-decimal-places-only-its-whole-number), I'm having trouble with condition statements that include a decimal point in the comparative value.

    Specifically, I have a field, "AC Match Hours", which sums the values from a column in an input table and displays or hides a message based on the result. If I set the condition value to a whole number, everything works perfectly, but if the condition value contains a decimal, the message is not hidden correctly.

    I have tried passing the condition value through another field to no avail. I also checked to see if the condition statement was just dropping everything after the decimal, but that did not seem to be the case either.

    Is there something that restricts conditions or calculated fields to integers? Is there a way to incorporate floats in conditions?

    Thank you!

  • Profile Image
    Mubeen_A
    Answered on November 20, 2021 at 02:14 AM

    Hi,

    Apologize for the inconvience.

    We looked into your form's condition https://www.jotform.com/build/213205849349057/settings/condition and looks like this issue is because of one of the conditions.

    In the update/calculate condition the 2 decimal places are selected by default. You are adding 6.4 as value in the show/hide condition however as the calculate/update condition is set up to show 2 decimals so it is adding 0 and showing 6.40 instead of 6.4 as a result the show/hide condition is not working


    1637392206_61989f4e8d4d1_unknown.png

    1637392459_6198a04b1fdc1_unknown.png

    You can either use 6.40 for match hours or update the condition to show a 1 decimal value.

    I hope this makes sense.

    Let us know if you have any other questions.