Matrix Field: Value being passed during calculation is always 0.

  • advantech
    Asked on June 30, 2016 at 7:04 PM

    I've been trying for a long time today to get this to work in its simplest form with no luck.

    I have a radio check box question with 2 hidden answers. The columns have numeric values of 1-5 attached to them. When I tell logic:

    IF Q1 = 1,2 THEN SHOW ANSWER A.
    IF Q1 = 3,4,5 THEN SHOW ANSWER B.

    Worked well.

    Now I added a 2nd question. When I tell logic:

    IF Q1 OR Q2 = 1,2 THEN SHOW ANSWER A.
    IF Q1 AND Q2 = 3,4,5 THEN SHOW ANSWER B.

    It keeps showing Answer B no matter what...even when nothing is checked. If 1 or 2 is checked, it does show Answer A, but also shows B.

    Pulling my hair out!!!

     

    Here's the form page address: https://form.jotform.com/61806654179969

  • Chriistian Jotform Support
    Replied on June 30, 2016 at 10:05 PM

    I cloned your form and I also encountered the same issue with the condition. It appears that the calculation values of the matrix field is not being read properly, which causes the condition based on the calculation values to not work correctly. Please allow me some time to investigate this issue further and I will get back to you once I have a workaround. Regards.

  • Chriistian Jotform Support
    Replied on June 30, 2016 at 10:29 PM

    After further tests, I was able to confirm that the calculation values are not working correctly. In my test form, I tried to pass the calculation value form the matrix into a number field and a textbox. However, in both instances the value returned is always 0, and not the values that I have set.

     

    Matrix Field: Value being passed during calculation is always 0 Screenshot 20

    I will have to escalate this issue to our backend team for further investigation. We will let you know on this thread once we have an update. Regards.

     

  • advantech
    Replied on July 1, 2016 at 11:41 AM

    Thanks Christian. Thought I was going nuts. Any chance I can get an estimate on a response to this? I've been with you guys for years and it is difficult to tell a client that we're working on it but have no target date. They don't tend to like that. Thanks in advance.

  • David JotForm Support Manager
    Replied on July 1, 2016 at 1:30 PM

    I can see that assigning values to the matrix option is not working. Unfortunately, there isn't an estimated time-frame for a resolution.

    But, it is possible to obtain the value from the options you have added through the hidden spans:

    Matrix Field: Value being passed during calculation is always 0 Screenshot 70

    Simply add two Form Calculation widgets:

    Matrix Field: Value being passed during calculation is always 0 Screenshot 81

    You will use then to obtain the values from each matrix: https://www.jotform.com/help/343-How-to-Perform-Form-Calculation-in-the-Matrix-Field 

    Matrix Field: Value being passed during calculation is always 0 Screenshot 92

    Matrix Field: Value being passed during calculation is always 0 Screenshot 103

    Then create the conditions to show the message fields depending on the results of each calculation widget:

    Matrix Field: Value being passed during calculation is always 0 Screenshot 114

    Result: https://form.jotform.com/61825603317958 

    Matrix Field: Value being passed during calculation is always 0 Screenshot 125

    You may clone my form and use it if you want to: http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Let us know if you need more help.

  • advantech
    Replied on July 18, 2016 at 6:32 PM

    I am finally back on this project with the same level of frustration as before. I made my form just the same way you did yours. https://form.jotform.com/61806654179969

    However, with one minor difference you did not take into account. One of my statements is ALL and one is ANY. The logic is sound and should work, but for the ANY statement, it always shows the hidden field before anything is even entered. I am racking my brain and cannot understand how something so simple will not work. Lots of wasted time. Please help.

  • advantech
    Replied on July 18, 2016 at 6:36 PM

    The only other difference is that my values are LESS THAN and GREATER THAN. Using individual number as you did will not work with the logic for the ALL condition.

     

  • advantech
    Replied on July 18, 2016 at 7:25 PM

    Found the answer. In the calculator, under advanced options, you must check: Wait for input before including the field in calculation.

  • Chriistian Jotform Support
    Replied on July 18, 2016 at 9:21 PM

    I am glad to know that you were able to resolve the issue. I checked your form and I can see that it is setup as you have stated. If you have any other concerns, feel free to contact us again. Cheers.