The reference syntax is shortened either because of the relative positioning
of the calculation or script that contains the reference syntax
and the object syntax references, or because shortcuts are used.
In general, although an abbreviated reference syntax is faster to
create, the disadvantage is that it works only as long as the objects
remain in the same positions relative to each other.
this illustration shows the hierarchy of a sample purchase order form.
illustration shows a fully qualified reference syntax, for both
This reference syntax could be used as part of a calculation or
script on any object on the form.
View full size graphic
- Root Node
- Form design root node
- Page object
- Subform name
- Object name
- Property or method name
Note: Even though the reference syntax is common to
each scripting language. For example, the reference syntax in the
example above works as is for FormCalc; however, you would need
to include a trailing semicolon (;) character for
If two objects exist in the same container,
such as a subform, they are referred to as sharing the same context.
Where objects exist in the same context, you can use an abbreviated
reference syntax that includes only the name of the object followed
by the property or method you want to access. For example, using
the example from above, the following abbreviated reference syntax
accesses the value of the txtCondition field from
any of the fields in the total subform:
two objects exist in different containers, they do not share the
same context. In this case, you can use an abbreviated reference
syntax; however, the syntax must begin with the name of the highest
level container object that the two objects do not have in common.
For example, using the hierarchy above, the following abbreviated
reference syntax accesses the value of the address field
from the txtCondition field:
to the way the XML Form Object Model is structured, some object
properties and methods exist on child objects of the objects on
the form. These child objects exist only as part of the XML Form
Object Model and do not appear in the Hierarchy and Data View palettes.
To access these properties and methods, you must include the child
objects in the reference syntax. For example, the following reference
syntax sets the tool tip text for the txtCondition field:
txtCondition.assist.toolTip.value = "Conditions of purchase." // FormCalc
information about the XML Form Object model objects and their structure,
see Scripting Reference.