Dynamic text based on page number
I'm trying to place a dynamic text on an hrform. The form is displaying wage types and when there are more than 2 pages, the values on the first page need to be summerized into a variable with the text subtotal in front of it. When we are on the last page, the text total with the total of all the wagetypes needs to be displayed. I tried to use the sfsy-page and sfsy-formpages variables to know on which page i am but the strange thing is that when i use in in program lines and i use debugger to look into the variable i get this:
sfsy-page = 1
sfsy-formpages = 1
sfsy-page = 2
sfsy-formpages = 2
But when i place it into a text element to test i get 1 of 2 on page one and 2 of 2 on page two. How is this possible?
Also i want to display a subtotal of the displayed wagetypes per page. Anyone an idea how i can do that?
The reason you get 1-1 ,2-2 in debugging is because, the pages are added dynamically,depending on the length of your main window.Which doesnt get captured initially,but can be used in text element.
As far as totalling on every page and at the last page is concerned ,try teh following link: