Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Page Number in Overflow Leader


Level 5
I have a two page form with the last field's height set to "Expand to Fit," which allows the form to possibly span over 3 or 4 pages. I have the flowed subform that houses the text field set to an Overflow Leader and Trailer. In the Leader, I would like to retrieve the page number of the current instance of that Leader to place in a text box within the Leader. I've tried playing with the xfa.layout.pageNumber() and the textBox.parent.PageNumber (parent being the Leader/subform). Neither are working. The best I can get is the value of "0" on each page.

Any ideas? I KNOW that there are 2 pages no matter what before the expandable part, so if there is some kind of index number for each instance of the Leader, I could use that too. I've been working mostly with the Layout:ready event.

Thanks for any help!

Ryan D. Lunka

Cardinal Solutions Group
4 Replies


Level 10
Can you try getting the page numbers at a later time (say doc Ready).


Level 5
I tried quickly, but couldn't get that to work. I'll play with that some more now that I know for sure docReady is a later event. The weird thing is, this works perfectly fine on another very similar form.

Let me restate my issue again, for better clarification. At the bottom of page 2 is the expandable text field. As that grows onto other pages, I need the overflow leader to display "Page 2.1" then "Page 2.2" etc. I just need something to help me count that second digit.



Level 10
Your technique is right sounds like your timing is wrong.


Level 5
Figured it out. For reference:

currentPage =;

this.rawValue = "2." + (currentPage - 2);

This script in the layout:ready event of the text field did it.

Thank you!