LiveCycle Designer ES supports the capability to create both unnamed objects and multiple objects with the same name. You can still create calculations and scripts to access and modify properties and values of unnamed objects by using the number sign (
#) notation and object occurrence values using the square bracket (
[ ]) notation. FormCalc correctly interprets the number sign (
#) and square bracket (
[ ]) characters; however, JavaScript does not. To access the value of a text field in a situation where the number sign (
#) or square brackets (
[ ]) occur, using JavaScript, you must use the
resolveNode method in conjunction with either a fully qualified reference syntax or an abbreviated reference syntax.
xfa.form.form1.#subform.TextField1.rawValue
xfa.form.form1.#subform[0].TextField1.rawValue
xfa.resolveNode(“xfa.form.form1.#subform.TextField1″).rawValue;
xfa.resolveNode(“xfa.form.form1.#subform[0].TextField1″).rawValue;
xfa.form.form1.#subform[1].TextField1.rawValue
// FormCalc
xfa.resolveNode(“xfa.form.form1.#subform[1].TextField1″).rawValue;
//
You can use the resolveNode method to reference objects within other reference syntax statements. This can help to reduce the amount of scripting you need to reference a particular object, property, or method. For example, you could simplify the reference syntax that points to a text field on the second page of your form to the following statement:
xfa.form.form1.resolveNode(“#subform[1].TextField1″).rawValue;
//