Generating Sequential Number
Hi, I have created a button to spawn new pages based on the template page in a PDF form. and in the template page, there is a field to generate sequential number everytime I spawn a new page, the trouble is every time I saved it and reopen it, the number goes up by "1", which messed up the whole document, so how am I able to set a condition to it to stop it updating every time I save it and reopen it. Does anyone have a clue to it please? Thanks very much.
The scripts I used for both spawning page and sequential numbering are here:
this.getTemplate("Task Card").
spawn(this.pageNum+1,true,false);
var num = this.getField("task no 1");
num.value = Number(num.value)+1;
num.defaultValue = num.value;
