Condition and Calculation Not Working Together

  • dlasson
    Asked on August 19, 2015 at 12:43 PM

    Please see the section entitled "HealthCare FSA." For the field "Annual Healthcare Election," users will enter a numerical value (currency). If the value is LESS than $2550, I want the "Per Pay" field to perform its calculation. If the value is GREATER than $2550, I want the message (listed in the condition) to appear either in the "Annual Healthcare Election" field or the "Per Pay" field. 

    Also, the default "$" is not showing in the "Annual HealthCare Election" field.

    Duplicate issue in the next field, "Dependent Care FSA," the only change being that the maximum is $5000.

    Thanks!

  • Charlie
    Replied on August 19, 2015 at 2:51 PM

    Hi,

    This is because you have a conditional logic for the rule greater than then you setup a formula inside the form calculation widget (Per Pay Healthcare). This is causing a conflict to what action to be done. You need to set a stricter and more straight forward action.

    I cloned your form for testing purposes, you can check how it works here: http://form.jotformpro.com/form/52305862245958 

    1. First, removed the formula in your form calculation widget for the field "Per Pay Healthcare...".

    Condition and Calculation Not Working Together Image 1 Screenshot 50

    2. Now use conditional logic to perform a calculation, we will use the same options to where you inserted the text for the maximum value, but in this case we will perform a calculation when the value is less than 2550. Below is the condition I setup, you'll notice I set a "Is equal to", this is because greater than and less than means it doesn't include the actual value. In this case, if the value IS 2550 and below then perform the calculation.

    Condition and Calculation Not Working Together Image 2 Screenshot 61

    3. Now here are the conditions for that specific field:

    Condition and Calculation Not Working Together Image 3 Screenshot 72

     

     

    Apply the same method in the other fields and the calculation should work.

     

    Regarding the follow up question on "$" not showing, I believe this is because you used the "Number" field, unfortunately, it doesn't accept non numerical values. You need to update that field to used a text box instead and set the validation to "Currency" then add a default value "$".

    Condition and Calculation Not Working Together Image 4 Screenshot 83

    However, this means you need to update the conditions you have already set.

     

    Do let us know if you need more assistance on this.

  • dlasson
    Replied on August 20, 2015 at 11:58 AM

    Hi.

    Regarding the "$": If I change the field to "text box" as you suggested, I don't get numerical condition options (i.e. "greater than, less than") when I go to set up the conditions that I need.

    Thanks.

  • Charlie
    Replied on August 20, 2015 at 1:25 PM

    Apologies for that, in that case, you might need to use two fields.

    1. First field is the text box that will allow you to have "$" in it.

    2. Second field is the Form Calculation widget that will fetch the value in the 1st field, now 2nd field can now be used in the conditional logic for greater and less than.

    Here's the updated sample form: http://form.jotformpro.com/form/52305862245958. Here's how I did mine.

    1. First I added the "Annual Healthcare Election..." as a text box field, as mentioned in the earlier post.

    Condition and Calculation Not Working Together Image 1 Screenshot 50

    2. I then added a form calculation widget, that widget will fetch the data from the text box.

    Inside the form calculation widget, this is the value fetched.

    Condition and Calculation Not Working Together Image 2 Screenshot 61

     

    3. In the conditional logic, we just point the "Converted Value" widget, because we can use greater and less than rules there.

    Condition and Calculation Not Working Together Image 3 Screenshot 72

    4. We don't want to show the "Converted Value" field, so you can set it to hidden.

    Condition and Calculation Not Working Together Image 4 Screenshot 83

     

    Do let us know if you need more assistance on this.

    Thank you.

  • dlasson
    Replied on August 21, 2015 at 3:06 PM

    For some reason, I cannot duplicate your solution. Specifically, the "Per pay Healthcare..." field is not computing.

  • Ben
    Replied on August 21, 2015 at 4:11 PM

    In that case I would recommend simply cloning the form of my colleague: http://form.jotformpro.com/form/52305862245958

    That way you just do few clicks and you have the same form in your account - no extra steps ;)

    You can see how to clone it to your account by following the steps here: How to Clone an Existing Form from a URL

    Do let us know of course if you happen to have any further questions or issues and we would be happy to assist.

  • dlasson
    Replied on September 9, 2015 at 12:50 PM

    Hi.

    http://form.jotform.us/form/52426685038157

    A condition is not working in one of my sections. Under "Voluntary Life"/ "Employee Coverage," I would like the "Max Coverage Amount Exceeded" field to appear if "Desired Coverage Amount" exceeds 500000. See the condition working for "Flexible Spending Accounts/ Healthcare" (though a different amount there).

    Thanks. 

  • Charlie
    Replied on September 9, 2015 at 2:11 PM

    @dlasson

    Hi, it seems like this is a different concern with the original thread, I see it's a different form. For us to better assist you, I went ahead and opened a separate thread for it, please refer to this link instead: http://www.jotform.com/answers/658188. We will address it shortly.

    Thank you.