Conditions in a form calulation widget are not working

  • Profile Image
    mimiramirez
    Asked on December 15, 2016 at 12:54 PM

    i have 2 calculation widgets for a matrix, the first one works properly (preliminar score Q2.2) calculating the score of my matrix, the second widget (final score Q2.2) should give a number as result of certain conditions in the first one, so if the first widget has the following results:

    total value equal or above 12 ---> write 4 in the second widget

    total value betweem 8 - 11---> write 3 in the second widget

    total value 4 - 7---> write 2 in the second widget

    less than 3 or = 3--->write 1 in the second widget

     

    but is not working, please id appreciate some help

     

     

  • Profile Image
    Kevin_G
    Answered on December 15, 2016 at 03:49 PM

    I have checked the conditions that you have currently associated to your field "final score Q2.2" and I can see they are different as you're describing here. 

    Here's a screenshot about what I see on my end: 

    As I can see there may be a conflict or at least two conditions being applied for example when the "preliminar score Q2.2" is equal to 8. 

    Also, I have noticed that there are multiple conditions with missing fields, please fix or disable them, otherwise this may also generate conflict between the conditions: 

    Now, you will need to explain the conditions as shown below, but before I would like to explain how the condition between should be worked. 

    When you set a condition to be triggered when a value is greater than 4, for example, then the 4 value will not be taken into account, it means that only will be taken the 5 value, so if you would like to set up your condition like "total value 4 - 7---> write 2 in the second widget" then you will need to change those values and will not use 4 and 7, so the final condition should be set up like this: 

    Do note that I have set the condition that all the statements need to be met, otherwise the condition will be always applied, also do note that when you are inserting a calculated value you cannot do it like "4-5" since this will be taken into the condition as a mathematical operation and the result of that will be added to the target field. 

    If you need to add text then you need to place the pointer over the field while in the conditions wizard and then click on the "A-Z" button that will add the result as text: 

    This is how I have set up the conditions in your form: 

    On my cloned version I have removed all the other fields and left only those that are involved on these conditions, please take a look here: https://form.jotform.com/63495843075970 

    Basically the logic should be the same if you need this to get applied to the other fields in your form. 

    Please do let us know should you have any question. 

  • Profile Image
    mimiramirez
    Answered on December 15, 2016 at 04:57 PM

     

     

    it works perfectly in your clone, is there anyway you could share it to me in a way i can open the editor and copy the conditions, cuz im having trouble to insert the numbers as text, as you put it in your image, you loaded a field that says the name of the question (2.2....) but i dont know where or what you clicked on. For the rest everything is good.

     

    Thanks a lot

    Here is an image of how mine looks trying to put the 1 as text

  • Profile Image
    Kevin_G
    Answered on December 15, 2016 at 06:16 PM

    The form where I worked the conditions is this one: https://form.jotform.com/63495843075970 

    And even though there is a way to clone my form there is not a way to copy the conditions and paste them into your form. 

    I have now checked the conditions in your form and noticed that there is only something different in the conditions, I have already fixed it for you and the conditions seem to be working as you need, here is also the screenshot of the only change that I made to your conditions: 

    Please do note that when you want to apply certain condition to a field when the value is equal, greater or less than another, "Any" should be set up, otherwise the condition will never be met since the value will never be less than the specified and greater or less at the same time. 

    Please check your form and confirm that the conditions work fine. 

    Regarding to my example about adding result as text, please do note that it was only an example, that value should not go there beside the "1"; however, you can set all of the fields in the calculations to be added as text by clicking on them, a variable in the calculation will look like this one while being added as text: 

    Another option is to set the entire result to be added as text, to do it you only need to click on the more option at the right bottom part of the condition wizard, then going to options and marking the one to add the result as text: 

    Hope this helps. 

  • Profile Image
    mimiramirez
    Answered on December 18, 2016 at 12:57 PM

    it works perfectly, now I have another question,

    is there a way to put in a calculation widget the amount of cells filled in in a matrix, I need to put the number of  filled cells that my respondents give in a widget so I can do the same as you helped me before, so if more than 2 projects are written that's equal to 4 points, 2 projects filled = 3 pts, one project=2pt, none=1. This is going on in question 2.5
  • Profile Image
    jonathan
    Answered on December 18, 2016 at 04:47 PM

    Your latest question was about a different feature of the form. We will attend to it separately here https://www.jotform.com/answers/1014529

    Thanks.