Copy link to clipboard
Copied
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.
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.
Copy link to clipboard
Copied
Check the field calculation order.
Copy link to clipboard
Copied
No matter what calculation order I set, this happens.
Copy link to clipboard
Copied
Can you share (part of) this form?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
The fields "ns1" and "ns2" shows always the value 0-
Copy link to clipboard
Copied
No not allways,
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
put in "zacetek" 01.03.2022 and in "konec" 30.11.2022
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
When I mouse click in the fields "zacetek" and "konec" I see wrong values.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
"The value I entered in Script_test is in format 1/3 and 30/11."
May be that the script fails with this values.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.