- prolinksoftwareAsked on December 14, 2016 at 01:35 PM
I'm using calculated fields to report out of a matrix. They used to work but seem to have stopped working and are now returning zeros. It's very simple.
1. I have a matrix with 5-1 and three sub fields.
2. I add 3 hidden calculated fields, each one pulling the value from the sub fields.
3. Everything was working until as late as 12/12 when a survey came in with the correct values for the sub fields.
Now when I run it, the calculated fields return zeros across the board.
In short, did you break something?
- JotForm SupportKevin_GAnswered on December 14, 2016 at 03:04 PM
I have checked your form and I can see what you're referring to; however, upon checking the form settings I can see hidden fields are being cleared as soon as the form is submitted.
What I would suggest you is to set this option to "Don't clear" this way you avoid the hidden fields to be sent empty.
Do let us know how it goes.
- prolinksoftwareAnswered on December 14, 2016 at 03:44 PMHi Kevin_G,
How did you get there? Here is what I'm seeing when I click Settings at
the form level..
I went back in and set it to use the ABC text string in your calculated
form so it was returning "Very Positive" and those results for a while.
This was per the little video I was sent. Then I think you changed
something again because it's now returning numbers (1-5) as the text
rather than the descriptions. Overall, this seems very unstable and
buggy. It keeps flipping back and forth and I'm having to do a lot of
coding to get around Jotform's inconsistencies.
Please let me know.
- JotForm SupportKevin_GAnswered on December 14, 2016 at 04:58 PM
I have not changed your form, I cloned it and changed that option on my end to get the form working and retaining the hidden field's values.
To change that setting to do not clear, please click on the preferences icon while in the form builder:
Once there go to the advanced tab and click on the show more button, scroll down a bit to find the option:
Once you change that setting then the hidden fields should not be cleared once the form is submitted, also, seems like the string option was sent while the calculation values failed or were missing, I have performed some tests on my end showing those hidden fields and it worked fine, please see the screenshot below:
I have also tested your form and noticed it works, calculation values are being copied instead of strings; however, if you notice this happens even when the calculation values have been properly saved in your matrix field, please do let us know.
- prolinksoftwareAnswered on December 14, 2016 at 05:44 PMHey guys,
I found the form level setting and changed it. Thanks.
As for the values, I'm getting mixed results even though I didn't change
Here are results from a form I submitted during testing at around 1pm
today. As you can see, the last three are zeros even though I filled in
5, 5, 5 respectively on the form itself.
Not being able to get it to give me numbers, I switched it to names per
your suggestion and filled out the form at 1:45. I got these results
(which are correct).
I figured I was all set and then a customer logged into the site at 2:15
and submitted the form and I received these results:
Woops.. back to numbers despite my having left the site after switching
it to the names and making no changes to the calculated fields.
So I'm not sure what I'm going to get, but I've coded my end to accept
both numbers and names just in case it decides to flip back to my last
preference of sending the names.
Here is some more forensic evidence showing you have a bug. As you can
see from the picture below, in my inbox is my submission from 1pm today.
The checkmarks are all 5's, but the calculated fields (at that point not
having been changed for two weeks) are no longer calculating anything
and are set to zero.
Anyway, perhaps changing that form setting will clear it all up. Only
time will tell.
- JotForm SupportKevin_GAnswered on December 14, 2016 at 07:07 PM
I have checked your form again and I cannot replicate the problem, I can see indeed on the last tests the form worked fine.
Also, upon checking the Form Calculation widgets you're using (Timeliness, Expertise, Courtesy) and I can see you are currently adding the result as text, please set this as number this way you avoid inconveniences since the values you have set up in the matrix field settings are numbers:
This should also help you to get always the numeric value of the matriz selection.
On your submissions I can see those that you're mentioning where the calculation values were sent as 0, but I can also see there are multiple changes recently and as mentioned above the problem cannot be replicated on my end; however, if this still persists on your end, please let us know.