Spawn page from template with partially resetted fields
Background: I have a PDF for reporting purposes where the second page repeats as many times as needed.
The number of repetition however is always different depending on the case.
I was successful in spawning a page from a template through a button with this code
var a = this.getTemplate ("template");
a.spawn();
However when I press the button the previously filed out page is basically being duplicated and fields are already filled out.
How can I reset all fields except for one certain field when clicking the spawn button?
Don't know if this should be another topic:
How can I make a sum of a certain field that repeats on every spawned page?
I know that the spawned field names are:
Pnn.template.fieldname
How can I make a sum of a fieldname that appears on every spawned page but with a unique Pnn Prefix?
Thanks a lot in advance for anyone taking the time to answer this.
