How can I make one condition heard over another?

  • localcoverageva
    Asked on November 9, 2018 at 12:06 PM

    Hi there, 

    I'm trying to create a condition in my LCV order form where if the 'all areas' option in a multiple choice field is chosen then the 'total areas' field will total 14. I've added this condition and it isn't working, the 'total area' field still shows 1.  I'm guessing this is because I also have a condition for that same multiple choice field to count the total choices of the field chosen, so when people choose multiple areas the total number of areas is counted in the 'total areas' field.  

    Are the conditions competing?  Is there a way for both of them to work?  If not, how would you recommend I go about this?  

    I've provided a screen shot of the original 'count' condition

    Thanks so much

    Jotform Thread 1638317 Screenshot
  • Adrian
    Replied on November 9, 2018 at 1:22 PM

    1541787603comp Screenshot 10

    If you are talking about the conditions shown in the image above, then yes, they can be in conflict if both of them are true.

    In order to prevent a conflict, you can edit the first condition so that if the second condition is true the first one is false.

    How can I make one condition heard over another? Image 21


    If you need further assistance please let us know what you are trying to achieve so that we can provide proper help.

  • localcoverageva
    Replied on November 17, 2018 at 3:39 PM
    Hello.  I tried your suggestion and it did not work.  I believe because in this case, ‘equal to’ also means ‘filled’.  
     
    what I’m trying to achieve is that when clients click all the areas they want (apart from the ‘All Areas’ option), the ‘total areas’ field will ‘count’ the rows and tell them how many areas they’re going to.  While if a client clicks the option ‘All Areas’, instead of ‘counting’, the 'total areas field' will calculate or say ’14’.
     
    Any further suggestions?  I could put the ‘all areas’ option in a separate field so I can create separate conditions, but I'd rather not have to as it looks a little clumsy, I'm also not sure how'd I'd do that- use the ‘Fancy Checkbox widget’ (unless you have another suggestion), however I could not find a way to alter the look of that widget so its font and size are not the same as my form and looks bad.
     
    thank you!
  • jonathan
    Replied on November 17, 2018 at 8:52 PM

    I think your count condition is faulty.

    1542505405zzz 2018 11 18 09 Screenshot 10


    The filled state value will also effect if All Areas option is selected.

    Please try change the condition to like this:

    1542505536zzz 2018 11 18 09 Screenshot 21


    and add this condition also

    (this is on the assumption that selecting both All Areas = 14).

    1542505657zzz 2018 11 18 09 Screenshot 32


    For calculation conditions, we also recommend using the short entry field(textbox field) for the output result.

    Do not use Calculation widget as repository of condition calculations because the widget also have its own calculation function which will disrupt the output when you are using it as repository for results of calculation conditions.

    See the image below on what I meant. You can see I uses a separate textbox field as repository for the condition calculations I have on the form.

    1542505831zzz 2018 11 18 09 Screenshot 43


    You can test my test form https://www.jotform.com/83207936558972

    I hope this help. Please let us know if you are still not able to make it work.


  • stephanie allen
    Replied on December 7, 2018 at 7:03 PM

    Hello,

    I've changed the conditions per your suggestion and changed the output result to a short entry field, however, the field seems not to be calculating correctly.  In the preview mode and the live form mode the number of areas are not showing up if anything other than 'all areas' is clicked, and in order for 'total number of areas' to show up as 14, BOTH 'all areas' in color and black and white need to be clicked- even though the condition is set to 'any', which is what it needs to be at.  It could be the preview and live mode are not registering the changes yet??  Any suggestions would be helpful, thank you so much!

    ps- I kept the old output field of 'total areas' for now until this is resolved, the new field 'text total areas' is the one to be included.

  • Mike_G JotForm Support
    Replied on December 7, 2018 at 9:16 PM

    I have checked your form and I see that there is a conflict that will happen no matter what conditions are added. Please give me some time — I'll try to work on a solution for your concern and I will let you know right away in this thread if I found any.

  • Mike_G JotForm Support
    Replied on December 11, 2018 at 4:58 PM

    I would like to apologize for any delays.

    Before we proceed with the solution, here's how I understand your concern.

    You have 2 Multiple Choice Fields — Please Choose All Areas You'd like to go to in BLACK AND WHITE: and Please Choose All Areas You'd like to go to in COLOR:

    Both fields have 15 options each. And 1 of the 15 options for both fields is an All Areas (7,146 agents) option.

    What you would like to happen is to count the number of selected options on both Multiple Choice fields and put the total into another field (Total Number of Areas). However, if the All Areas (7,146 agents) option is selected in ANY of the Multiple Choice fields, the total should automatically be equal to 14.

    I have below a solution based on how I understand your concern.

    What you will need are 2 additional Number fields (can be Short Text Entry fields if you want) and 4 additional conditions in your form to meet your requirements.

    1544564139t16 34 33 Screenshot 10

    The first additional field will be filled with a value of 14 if the All Areas (7,146 agents) option is selected in ANY of the Multiple Choice fields.

    1544564683t16 44 21 Screenshot 21

    And the second additional field will have the total number of selected options in both Multiple Choice fields if ANY of the Multiple Choice fields is filled.

    1544564774t16 45 44 Screenshot 32

    Then, 2 of the 4 additional conditions will check if the first additional field is filled or empty.

    If the first additional field is filled then the Total Number of Areas field will have the value of the first additional field (14).

    But if the first additional field is empty then the Total Number of Areas field will have the value of the second additional field (selected option count).

    1544565144t16 47 43 Screenshot 43

    Here's a Sample Form (copy of your form) where I have applied the workaround above.

    https://form.jotform.com/83446390467970

    You can hide the 2 additional fields so it will not be shown to your respondents — How-to-Hide-Form-Fields

    Feel free to create a copy of the Sample Form in your account so you can inspect it better — How-to-Clone-an-Existing-Form-from-a-URL

    And if you have other questions, please do not hesitate to ask us anytime.