I don’t know how can I access those variables via script in the designer. Basically I want to have a text box that will be driven by script. There will be different text to display for not last page, and different for last page. Pseudo code below
if ( {#} != {##}) {
display AAA
} else {
display BBB
}
P.S. Ok i know this is possible by setting Sheet configuration and creating Master page for last page, but I really would like to do that in the script if possible
Unless something has changed that I am not aware of you cannot access the page number/count within a script. That functionality is built into the designer interface from what I gather. The only way I know of is using master pages as you mentioned.
Yeah Rod, that would work, but thinking from maintenance perspective - this is like another layer that developer needs to keep an eye on during development (since this element will not be visible on the design - created on fly).
Accessing Page number and Page count directly from Design would be really helpful
I think I will go for Sheet configuration solution, but of course I will mark Rod’s solution as valid as it may be helpful for someone else