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

Display Pattern working incorrectly when maxChar>16

HeatherMason
Registered: Sep 20 2007
Posts: 5

Hi,I'm using LiveCycle Designer 8.0, and need to format a text field/numeric field (maxChar = 20) to 999,999 style.
 
Anyway, I've set the Display pattern to
 
zz,zzz,zzz,zzz,zzz,zzz,zz9
 
But somehow it does not work correctly.
 
The problem is: when input's length > 15, the displayed value is wrong. e.g
55555555555555555555 will be displayed as 55,555,555,555,555,557,000.
 
Yet it works good if input's lenth

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
First, Numerical fields cannot be set to a limited number of characters. This is especially problematic when the inserted commas add new characters that break the limit.

Second, the computer cannot represent whole numbers beyond a certain size. It just doesn't have the capacity. This is a fundamental limit of all computers and the whole point of using exponential notation.

Third, if you are using numbers this large then you must be doing scientific or mathmatical calculations of some kind and you already understand that the least significant digits have little or no meaning. So it's pointless to try and represent them, hence the term, "Scientific Notation".

However, if you are just doing text formatting, and not worried about actually using the number, then use a "text" field and a custom Picture Clause. You can find the Picture Clause documentation by searching on the Adobe web site. Here's a link to start with.

[url=http://partners.adobe.com/public/developer/tips]http://partners.adobe.com/public/developer/tips[/url]

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