Solved

Adobe Acrobat Field Validation

Posted on 2013-11-26
7
393 Views
Last Modified: 2013-12-02
Hi Experts,

I am working on an Adobe Acrobat form that has two fields.  The first is called 'Percentage' and the second is called 'Amount".

I am trying to figure out a validation rule that would allow the user to enter an amount in only one of those 2 fields.  So if there is something other than zero in the Percentage field, then they get a warning if they try to enter something in the Amount field, and vice vera.

Any suggestions are appreciated.

Thanks,

JJ
0
Comment
Question by:JJINFM
  • 4
  • 3
7 Comments
 
LVL 18

Expert Comment

by:Steven Harris
Comment Utility
You may try something like:

var cField = ' other field name ';
if(cField=<0)
{
     app.alert("Please use one field only...");
     event.target.textColor = color.red;
}
else
{
     your calculation or code here
}

Open in new window

0
 

Author Comment

by:JJINFM
Comment Utility
I get an error that reads: "SyntaxError: illegal XML character 2 : at line 3"

Would you know the cause?
0
 
LVL 18

Expert Comment

by:Steven Harris
Comment Utility
It is probably not liking the format I am using, I am typing this freehand.  See if this errors as well:

var cField = ' other field name ';
if(cField=<0){app.alert("Please use one field only...");
event.target.textColor = color.red;}
else{your calculation or code here}

Open in new window

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:JJINFM
Comment Utility
What seems to be the problem is "=<".  The editor will take "=" ,or "<", or "<=", but not "=<"

When I use "=<" I get the SyntaxError: illegal XML character 2: at line 3 message
0
 
LVL 18

Accepted Solution

by:
Steven Harris earned 500 total points
Comment Utility
Switch over to (cField  >0), or you can also try (cField > "")

You may actually prefer the latter since you are looking for any value, not just a number greater than zero.
0
 

Author Comment

by:JJINFM
Comment Utility
Excellent.  using cField>"" worked

Thanks for your help!
0
 
LVL 18

Expert Comment

by:Steven Harris
Comment Utility
Glad I could help!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Can Be Caused By Disabled Services I have encountered a problem viewing PDF files using Adobe Acrobat Reader.  For the longest time, PDFs might launch or might not.  Sometimes they took about 15 minutes to appear after launching them. After som…
Update 21-May-2015: I temporarily removed the source code to make major changes to the program. Regards, Joe INTRODUCTION This article presents a solution to a question (http://www.experts-exchange.com/Programming/Installation/Q_28396542.html)…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now