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

Need help with......."this.parent" expressions

JCASE
Registered: May 12 2010
Posts: 29

I am using "this.parent" expression in buttons for a few functions like clearing text in text fields. but what if I want the same button to clear text in a text field on a different page and/or subform. I know it's not "this.parent" because the text field isn't in the same page or subform as the clear button. what is the alternate script?

Below is the button functions I am using where the button is in the same subform. How do I extend the particular function of a button to perform the same action to fields in another page and/or subform?

Example 1: Delete Instance button

this.resolveNode("Subform1").instanceManager.removeInstance(this.parent.index);
xfa.form.recalculate(1);

Example 2: Clear field(s) button

var f1 = this.parent.somExpression + ".TextField1" + ",";
var f2 = f1 + this.parent.somExpression + ".TextField2" + ",";
xfa.host.resetData(f2);
xfa.form.recalculate(1);

My Product Information:
LiveCycle Designer, Windows
jonom
Registered: Jan 31 2008
Posts: 133
While you are clicked in the Script Editor you should see a line at the bottom of the window that says "To insert an object's SOM into the editor, press CTRL (relative-SOM) or CTRL-SHIFT (absolute-SOM) and click on an object".

The trick is to navigate to where you can see the object you are trying to reference, click in the Script Editor and then press CTRL or CTRL-SHIFT and click on the object you want - the mouse cursor should change to a "V" when you are over a valid target.