on 01-30-2012 8:40 PM
Hi ,
I want to add afield in a particular table with first field is its serial number . How to use scripting editor to fill the serial number ?
How to create a counter ?
Edited by: Rajan.Dexter9 on Jan 30, 2012 9:40 PM
Hello Rajan,
Create a field in the table and name it as 'SERIAL'. Create a variable called 'count' with default value as 0. Now in script editor, for javascript language and calculate event, write the following script.
var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);
for (var i=0; i <= fields.length-1; i++)
{
if (fields.item(i).name == "SERIAL")
{
count.value = count.value + 1;
this.rawValue = count.value;
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.