Expand my Community achievements bar.

Creating a table of contents


Former Community Member
I was wondering if somebody could help with building a table of contents. The page number functionality is present in the library which I drag and drop onto the master page. Now if I could grab that page number value into a text field on the corresponding page that would be very helpful.

Could somebody please provide me with that script.


3 Replies


Former Community Member
You shouldl be able to get the page that an object is on by using the xfa.layout.page(Fieldname);


Former Community Member
Thanks Paul.

I tried your script and failed. Here is the scenario: I have a text field called partOne that resides in a subform called part1 which in turn resides in a subform called rfqDetail.

And in my contents page I created a field to capture the page number and the initialize script that I included in it was:

this.rawValue = xfa.layout.page(rfqDetail.part1.partOne);

However, all I keep getting is a "-1" value in the text field in the contents page. Any ideas as to what I am doing wrong?

Thanks again for your help.