I have a repeating subform with a list of names.
I would like the first name in this subform to appear on every page.
top of page 1
Is their a script I can place in a field on the master page to make this happen? If not is there a way to make this happen?
Thank you for any assistance.
1) The input data to PDF/XDP is an XML. Any XML is always represented in a parent child (tree) hierarchy. The XML that i had shared in the above post is just a sample one.
2) The script can be added in the initialize event of a field.
Suggest you to go through the basics of scripting, a PDF that is avaialble at following path:
If you are still facing an issue, pls mail me your template and XML at email@example.com
I'm not very advanced in this software and I'm having a difficult time understanding the process. Where can I find the XML that shows the tree that you outlined? Also, where should I place the script? When I keep the binding as Global it make all the names the same.
Considering that your XML looks something like this:
You can add the following scirpt at the ffield level (for firsName):
this.rawValue = xfa.resolveNode("$record.main1.page1.repeat.firstName").value;
Note: 1) $record always refer to the parent node (here it is main). So, it is not requied to mention the top most parent name main in the path.
2) Since the index is not mentioned, the above script will always take the first repeating intance values
Keep the binding as Global
Please let me know if there is any issue.
Thank you for your assistance, but can you please tell me how to bind it only to the first row? When I go under Object, Binding and use global binding and the other "name fields" in my table are the same.
Thanks again for your assistance.
I believe there is no need of scripting.
Since you always wanted the first intance to repeat on every page, why don't you create a subform in the Master Page? This subform should have a table with one row which can be binded to the first instance of the repeating section in the XML.
In this case, your hierarchy would be something like this:
Please let me know if i am not clear.