These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

renumbering on flowable subform pages

JuJo
Registered: Jun 22 2011
Posts: 6
Answered

Hello,
 
I have multiple flowable subform pages that represent different existing paper forms (0700, 0800, 0805, etc.). I am combining them all into a single pdf form, and everything is working out great. I am really liking what LiveCycle can do. However, I have a single requirement that has been stumping me for weeks. How do I get the subform pages to renumber?
 
For example, I can currently display "Page 1 of 20" for the entire pdf document. What I want to see is "Page 1 of 3" for the 0700, "Page 1 of 2" for the 0800, etc. And since some of these forms can expand, I need the "of #" to dynamically change to represent added pages to that particular subform page.
 
I can get the current "Page #" of the subform page using,
 
this.rawValue = this.Section0700_ms.index +1;
 
but the "of #" is giving me fits. Any help would be greatly appreciated.
 
J

My Product Information:
LiveCycle Designer, Windows
JuJo
Registered: Jun 22 2011
Posts: 6
JuJo wrote:
Hello,I have multiple flowable subform pages that represent different existing paper forms (0700, 0800, 0805, etc.). I am combining them all into a single pdf form, and everything is working out great. I am really liking what LiveCycle can do. However, I have a single requirement that has been stumping me for weeks. How do I get the subform pages to renumber?

For example, I can currently display "Page 1 of 20" for the entire pdf document. What I want to see is "Page 1 of 3" for the 0700, "Page 1 of 2" for the 0800, etc. And since some of these forms can expand, I need the "of #" to dynamically change to represent added pages to that particular subform page.

I can get the current "Page #" of the subform page using,

this.rawValue = this.Section0700_ms.index +1;

but the "of #" is giving me fits. Any help would be greatly appreciated.

J
I meant to say that I'm running that script in the ready:layout event of the master page for a given subform page. In this example, it was for the 0700 instance.
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Accepted Answer
Hi,

I designed an example for you.
It has 3 separate master pages (A, B and C) where each has it's individual page count.

To count the current instance of master page A I used:
this.rawValue = A.index + 1;
Ans, to count all instances of master page A:
this.rawValue = xfa.resolveNodes("A[*]").length;
Here's the sample form.
Just add new instances of subforms on each page.
You will see that the counters will increment for each master page individually.


Hope this helps!

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

JuJo
Registered: Jun 22 2011
Posts: 6
Thanks radz!

That worked like a charm. I was trying to do something much more difficult.

I really appreciate the help. I've been working on this one thing for weeks!

J