Expand my Community achievements bar.

how to identify the name of a subform from the master page

Avatar

Level 4

hello I should make a control so that the objects are visible only to a specific page in a pdf form.

These items must be in the master page.

Because the module is dynamic I can not know the exact number of pages.

I wanted to ask if you can identify the name of a subform of the form from the master page?

1 Reply

Avatar

Level 10

Repeated masterpages use the same logic as any other repeated object - they have instance numbers.

To address the second instance you can use an expression like.

xfa.resolveNode("form1.masterpage[1].subform").presence = "hidden";

If you're not sure about the correct SOM expression you can use a small script for testing.

Put a textfield into the subform you want control.

Add this script into its calculate event.

this.rawValue = this.parent.somExpression;

If you preview the form in Designer you'll see the SOM expression of the text fields parent, which is the subform.

Copy it and put it into the script to hide the subform.