Highlighted

Page Number in Overflow Leader

Avatar

Avatar

Ryan_Lunka

Avatar

Ryan_Lunka

Ryan_Lunka

17-12-2008

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

rlunka@cardinalsolutions.com

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

17-12-2008

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

Avatar

Avatar

Ryan_Lunka

Avatar

Ryan_Lunka

Ryan_Lunka

17-12-2008

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.



Thanks.
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

17-12-2008

Your technique is right ...it sounds like your timing is wrong.
Highlighted

Avatar

Avatar

Ryan_Lunka

Avatar

Ryan_Lunka

Ryan_Lunka

17-12-2008

Figured it out. For reference:



currentPage = xfa.layout.page(this);

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



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



Thank you!