These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Invalid enumerated value

Runolfr
Registered: Oct 1 2008
Posts: 119

I'm getting an "Invalid enumerated value: postSubmit" error in line 2706 of my form. The post submit script is designed to unprotect specific fields on the form so the user can submit multiple requests using the same header information.

This ran fine when I wrote and tested it, but today it has decided not to work. Any ideas?

Script follows (written in LiveCycle Designer 8.2)...

ReferralRequestForm.ReferralRequestPage1.Button1::postSubmit:form - (JavaScript, client)

// Provide option to reopen the form for further requests regarding the same patient.

// Verify submission
var cMsg = "Do you want to submit another request for this patient? \n\n"
cMsg += "Select YES to CLEAR and UNLOCK the requested services fields for new entries.\n\n"
cMsg += "Do you want to Continue?\n\n"
var nRtn = app.alert(cMsg,1,2, "Unlock Form?");

if(nRtn == 4) { // A Yes Answer

// Unlock specific fields in the Requested Services and Clinical Information section
ClinicalInformation.RequestedServices.access = "open";
ClinicalInformation.RequestedProvider.access = "open";
ClinicalInformation.SupportingDiagnoses.access = "open";
ClinicalInformation.ClinicalInformation.access = "open";
ClinicalInformation.DiscussedWith.MedicalDirector.access = "open";
ClinicalInformation.DiscussedWith.PC.access = "open";
ClinicalInformation.DiscussedWith.RpFamily.access = "open";
ClinicalInformation.CarePriority.access = "open";

// Clear content of unlocked fields
ClinicalInformation.RequestedServices.rawValue = null;
ClinicalInformation.RequestedProvider.rawValue = null;
ClinicalInformation.SupportingDiagnoses.rawValue = null;
ClinicalInformation.ClinicalInformation.rawValue = null;
ClinicalInformation.DiscussedWith.MedicalDirector.rawValue = 0;
ClinicalInformation.DiscussedWith.PC.rawValue = 0;
ClinicalInformation.DiscussedWith.RpFamily.rawValue = 0;
ClinicalInformation.CarePriority.rawValue = "Routine";

// Unlock Submit button
this.access = "open";

}
endif; // alert "Yes"

ReferralRequestForm.ReferralRequestPage1.Button1::preSubmit:form - (JavaScript, client)

// Validate before continuing
if (ReferralRequestForm.execValidate() == true) {

// Verify submission
var cMsg = "Are you sure you are ready to submit this form? \n\n"
cMsg += "Select YES to LOCK the form and generate the email.\n\n"
cMsg += "Do you want to Continue?\n\n"
var nRtn = app.alert(cMsg,1,2, "Lock Form?");

if(nRtn == 4)
{ // A Yes Answer
// Get the field containers from each page.
for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) {
var oFields = xfa.layout.pageContent(nPageCount, "field");
var nNodesLength = oFields.length;
// Set the field property.
for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) {
oFields.item(nNodeCount).access = "protected";
}
}

// Specify email subject line
var eAddress = "my [dot] name [at] company [dot] com";
switch (ReferralInformation.Setting.rawValue) {
case "Long-Term Care":
eAddress = "umltc [at] company [dot] com";
break;
case "Assisted Living":
eAddress = "umal [at] company [dot] com";
break;
default:
eAddress = "my [dot] name [at] company [dot] com";
break;
} // end eAddress switch

this.resolveNode("#event").submit.target = "mailto:" + eAddress + "?&subject=Routine/Specialty Referral, MemberID: "
+ ReferralInformation.MemberID.rawValue;

}
endif; // alert "Yes"

}
endif; // form validates

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Which line is 2706? I think that info might help;)

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

Runolfr
Registered: Oct 1 2008
Posts: 119
I have yet to figure out how to show line numbers.
try67
Expert
Registered: Oct 30 2008
Posts: 2399
Copy your script into a text editor that displays line numebrs, such as Notepad++.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

CBT_ENGINEER
Registered: Sep 2 2009
Posts: 8
I am receiving the same error except mine says *vale: PDF and occurs when I ope my form in Acrobat 8 Pro. I get the error 3 times then the form opens. It says the error is on line 1086 which is :This is the whole section of code that line 1086 affects:

The code looks pretty open and closed to me, but a programmer I am not. Anyone got any suggestions?