How to correctly set conditional statements to calculate correctly?

  • paulbdesign
    Asked on June 14, 2019 at 6:12 PM

    I have 2 dropdown elements that are being calculated together using the form calculation widget.

    I have multiple conditional statements built in my settings to change the thank you page URL.

    My question is, how can I understand why some of my conditional statements are not clicking through to the correct thank you page. I am thinking that I have spaces that are being falsely calculated somehow.

    I have attempted to use calculation values in the dropdown properties panel to have no spaces between characters, but that did not solve my problem.

    I am attaching a screenshot of one of my conditional statements that is not calculating correctly.

    Jotform Thread 1857863 Screenshot
  • jherwin
    Replied on June 14, 2019 at 8:58 PM

    The values ​​or conditions you have shown in the screenshot are correct. However, some of your conditional logic has space after value. Please check and remove spaces, the value should be like this: test1,test2,test3.

    CONTAINS condition does not recognize the second value if you add space after the first value.

    Kindly check and correct the values, if the issue persists please let us know.

  • paulbdesign
    Replied on June 17, 2019 at 1:19 PM

    My issue is persisting after changing all calculated values to not have any spaces. For whatever reason I have the 2 conditions shown below. Whichever condition I list last, works correctly. I cannot figure out why they would be overruling each other. Any ideas? 1560791951Screen Shot 2019 06 17 at 10 Screenshot 101560791931Screen Shot 2019 06 17 at 10 Screenshot 21

  • paulbdesign
    Replied on June 24, 2019 at 12:42 PM

    My form is still not resolved. I have gone through and double checked that all spaces are removed, but I am still seeing my conditional statements overruling other conditional statements even though they are wrong. 

    Do numbers possibly separate conditions like commas do? 

    Is there anything else I can do to ensure my conditions do not overlap?

  • denis_calin Jotform Support
    Replied on June 24, 2019 at 2:21 PM

    Hi Paul!

    I have just made a few test submissions on your form and was redirected to the correct page after clicking on Show Service Packages. For example, I have selected 2012 as the Vehicle Year and E550 as the Vehicle Model and was taken to the /service_e10.htm page. I have also selected 2019 as the Vehicle Year and S 550 Coupe as the Vehicle Model and was redirected to the /service_sc1.htm page. I have tried a few other year and model combinations and was taken to the intended page every time. Can you please let us know if you are still experiencing any issues with conditions not working correctly and specify which Model and Year combinations do not take the user to the correct page? 

  • paulbdesign
    Replied on June 24, 2019 at 2:25 PM

    Thank you for following up with me! You beat me to my response and solution to the problem! What is working for me now is that if I select A-Z (string) in the calculation properties it will not respect numbers, but ONLY letters. For example if I have a C63AMG value, The value used I think, was resulting in just AMG. So I have modified each value to be CsixtythreeAMG and that seems to have solved my overlapping conditions issue.

    Thank you again.

    Paul

  • denis_calin Jotform Support
    Replied on June 24, 2019 at 3:48 PM

    You are welcome Paul. I'm glad you were able to find the solution to the problem!