I have custom calculation scripts in adobe fillable forms. Everything was working fine until I placed checkboxes in the form. Now two of the custom calculation scripts show the default value when I check the checkbox. This happens randomly, and not always, no matter which checkbox I check.
What did I do wrong to make this happen?
Im asking for help.
Check the field calculation order.
No matter what calculation order I set, this happens.
Can you share (part of) this form?
The fields "ns1" and "ns2" shows always the value 0-
No not allways,
I can't reproduce this isue.
I checked and unchecked all the checkboxes after filling in the Date fields: it does not change the NS1 and NS2 fields.
put in "zacetek" 01.03.2022 and in "konec" 30.11.2022
Indeed, it is bugging somewhere.
But there are too many calculations and scripts for me to help you quickly.
You need to check all your scripts and all your calculations until you isolate the culprit.
For testing I made this file, which has only to calculation scripts. Without checkbox scripts are workin as it should, but with checkbox not. Test I was made with 01.03.2022 and 30.11.2022. Corect result is in "ns1" = 60 and in "ns2" = 47.
Debugger don't show error. But I don't find what is wrong in script.
When I mouse click in the fields "zacetek" and "konec" I see wrong values.
You are right. The value I entered in Script_test is in format 1/3 and 30/11.
But the same behaivor of my form I got with entered date in format 01.03.2022 and 30.11.2022 and five checkboxes. I am in dark. I am trying to find error in my script with no luck. That is why I am asking for help here.
"The value I entered in Script_test is in format 1/3 and 30/11."
May be that the script fails with this values.
The basis for the calculation script "ns1" is the excel formula in cell F21 and "ns2" in cell F22, in the attached file. Since the formula in Excel works flawlessly, I translated it into a calculation script. Since the debugger did not report any errors, I assumed that everything was OK with the script. But it isn't.
There is an error in the script, but I can't find it.
Any help is welcome.
After several days of searching for errors in the script, I finally succeeded. I have a fully working script. Thanks to everyone who pointed me in the right direction and helped me find a solution.
Mainly the brackets were missing, I changed some scripts in the text boxes and used them as a function. And I succeeded.