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

How to find available variables

hap000
Registered: Jun 5 2007
Posts: 9

From examples in this forum, I have used this.getField("field name").value and event.value. Is there a good place to find all the available variables for different structures (e.g. event, this)?

Thanks,

Hap

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
It is possible to enumerate the fields with JavaScript, but not any variables, as these can change with were one is testing for this information because of the scope of the variable.

George Kaiser

hap000
Registered: Jun 5 2007
Posts: 9
Okay. But, how can I get a list of available fields for each structure?
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
An example from the Acrobat JavaScript Scripting Reference, this can not be used in LiveCycle Designer:

// Enumerate through all of the fields in the document.
for (var i = 0; i < this.numFields; i++)
console.println("Field[" + i + "] = " + this.getNthFieldName(i));

George Kaiser