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

No expressions for log and exponential arithmatic?

nicoboy
Registered: Jan 12 2010
Posts: 14
Answered

Are you serious?

My Product Information:
Acrobat Pro Extended 9.2, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You can use some Acrobat JavaScript and EMCA JavaScript. JavaScript has the 'Math.log()', 'Math.pow()' methods.

Since LiveCycle Designer converts the 'Math' properties to the specific property with a capital letter, you could try that. So you could try "Log(value)' and 'Pow(base, value)'.

A search for undocumented LiveCycle Designer functions results in the [url=http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=14073]Undocumented FormCalc Scientific Functions[/url] that list a series of undocumented 'Math' methods that were part of the version 7 specification but are no longer listed.

George Kaiser

nicoboy
Registered: Jan 12 2010
Posts: 14
why would they not list them in version 9? Whats the thinking?

What else is not listed? Is there anywhere we can get a complete guide on FormCalc?

Thanks Again
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
The have not listed them in many versions.

I guess they thought that those who would use those functions would use the JavaScript language option. Of they would not need to explain the functions if they omitted them.

George Kaiser

nicoboy
Registered: Jan 12 2010
Posts: 14
Well I don't know anything about Java script, I did some work with VB 6.

I preferred to learn FormCalc since it's faster and I think easier to learn. I can't understand why they would make such an assumption.

What about working with Arrays? Even that I can't find too much. Very surprising that they would create a language specific for their product an then not document it properly.

geez
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You can create a JavaScript object in the form called 'states' with the following code;

var aTest = new Array(["California", "Ca"], ["Illinois" , "IL"]);
And then create a button with the following JavaScript code:
console.show();console.clear();for(i = 0; i < 2; i++) {for(j = 0; j < 2; j++) {console.println('[' + j +'][' + i +']: ' + states.aTest[i][j]);} // end j loop} // end i loop

And the console display will show each element as a separate line and the index values used to access that item:
Quote:
[0][0]: California
[1][0]: Ca
[0][1]: Illinois
[1][1]: IL
My calculator and computer in college was a slide rule. Computers filled a room.

George Kaiser

nicoboy
Registered: Jan 12 2010
Posts: 14
No No..please don't even go there. I don't want to learn Java. Yes I used to stack my cards too when I was learning Fortran.

I guess why I dont like Jave is because there are way too may brackets and back slashes.

If you ever come across any guide that has some meaningful content, please let me know

Thanks again.
jonom
Registered: Jan 31 2008
Posts: 133
JavaScript (not Java) is actually pretty easy to get a handle on (and fairly similar to FormCalc) and can serve you quite well for other things whereas FormCalc is a one-trick pony. I figured if I was going to learn a language I might as well learn one that is useful for other things.

I've written some addons for Acrobat using JavaScript as well as scripting for LiveCycle and I hadn't done any programming in about 20 years - you can also use it for scripting InDesign, Photoshop, etc.

JavaScript is also good if any of your forms get served up by the LiveCycle server suite, it's my understanding that FormCalc won't work for that environment.

FormCalc does do some things better, like handling date math.
nicoboy
Registered: Jan 12 2010
Posts: 14
Oh yea no lack of date stuff ..there is tons of it.

I will take your advice and look into Java. Tobad they dont use Visual Basic 6, at least I have some knowledge.
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
There is the [url=http://www.adobe.com/devnet/livecycle/]LiveCycle Developer site[/url], [url=http://www.adobe.com/devnet/acrobat/]Acrobat Developer site[/url], [url=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference]Core JavaScirpt 1.5 Reference[/url], [url=http://forms.stefcameron.com/]Stefan Cameron on Forms[/url], [url=http://www.pdfscripting.com/]pdfscripting.com[/url], and the tutorials and eSeminars on demand at this site.

Ted Podova's [url=http://www.amazon.com/Forms-Using-Acrobat-LiveCycle-Designer/dp/047040017X]PDF Forms Using Acrobat and LiveCycle Designer Bible[/url].

George Kaiser

nicoboy
Registered: Jan 12 2010
Posts: 14
Thanks a lot my friend..I will be BACK!