Copy link to clipboard
Copied
Cann somebody help me locate and fix this error?
Problem is in script "TotalTravelHours" after you picked fields you renamed them, they are now named "TravelHours1.1" not "TravelHours1". So just re-pick them again.
Copy link to clipboard
Copied
Please be more descriptive about the issue?
Does it happen when you click on any of the buttons?
If yes, which button (Reset, Print, Save)? and share the code (if any).
Also, is any calculated field on that form dependent on what is supposed to be selected on the dropdown menus (under the column Service Heading)?
You have Service Heading dropdown marked as a required field but nothing is selected on it.
Do you get the same error if you make a selection on any of the "Service Heading" dropdown menus and then execute any of the button actions?
Copy link to clipboard
Copied
I thought the reset button was causing the issue, after I changed some of the code, but when I went back to original code
// A MouseUp action
var nButton1 = app.alert({
cTitle: "CLEAR FORM WARNING",
cMsg: "STOP! DO NOT CLEAR THIS FORM UNLESS YOU SAVE IT FIRST. \r\rIf you have not saved this document yet, go ahead and click NO to save now, otherwise click YES to clear this form. \r\rWould you like to proceed and clear this form now?",
nIcon: 1, nType: 2
});
//if user clicks on YES button it will alert the user that it will reset and ask YES or NO to proceed
if ( nButton1 == 4 ) {
// clear and reset all the fields objects in this document
this.resetForm();
}
, still getting the error and also f is null error:
As for the rest of your question, it seems to be the location dropdown that is failing, but I have this code in the Service Heading field validation:
event.target.required = event.value == "--- Please Select One ---" ? true : false;
Maybe I'm not handling the validation correctly?
The code for the Location dropdown is:
if (event.value) {
var f = event.target;
var found = false;
for (var i=0; i<f.numItems; i++) {
if (f.getItemAt(i, false)==event.value) {found = true; break;}
}
if (!found) {
f.insertItemAt({nIdx: -1, cName: event.value});
f.defaultValue = f.getItemAt(0, false);
}
}
This is also on the validation tab.
On the Action script:
// Display alert box
app.alert({cMsg:"Please choose an Existing Location or enter a New Location (the new location will be saved in the dropdown list).",
cTitle:"Location Information Request",
nIcon:3,
});
Copy link to clipboard
Copied
If you are using Simplified field notation for calculation, make sure your field names doesn't have special characters or empty space which you can escape with backslash like this: field\ 1.
It would be better to use custom calculation script in those cases.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
This error message could indicate an error in the installation of the application. Try running a Repair Installation from the Help menu.
Copy link to clipboard
Copied
Here is the whole list of errors after uninstalling Acrobat Pro DC 32-bit and installing 64-bit. I even tried doing a repair on the new install which is latest version:
Exception in line 1282 of function AFSimple_Calculate, script byteCodeTool
Exception in line 1 of function top_level, script Field:Calculate
Exception in line 1282 of function AFSimple_Calculate, script byteCodeTool
Exception in line 1 of function top_level, script Field:Calculate
TypeError: f is null
1282:byteCodeToolException in line 1282 of function AFSimple_Calculate, script byteCodeTool
Exception in line 1 of function top_level, script Field:Calculate
TypeError: f is null
1282:byteCodeTool
Copy link to clipboard
Copied
I get the same three errors no matter what field I change or add text to or dropdown selection, regardless of whether it is a required field or not. Required field validations have been removed. I have removed and reapplied several scripts. This issue just cropped up out of nowhere. I have to wonder if it is a bug in the latest version/update of Acrobat? The console gives me these error messages, but does not display a script that is causing the error. So I am clueless and about ready to just turn off the console.
Copy link to clipboard
Copied
Share your file so people can actually see what is going on and help you.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Problem is in script "TotalTravelHours" after you picked fields you renamed them, they are now named "TravelHours1.1" not "TravelHours1". So just re-pick them again.