These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Change instance value from 0 to 1

goldie6175
Registered: Feb 26 2008
Posts: 38
Answered

I have a dynamic table and the first instance shows up as zero. Can I change it to 1 so it looks more like a line item?

Thanks.

sconforms
Expert
Registered: Jul 10 2007
Posts: 92
goldie6175,

Instances are always zero-based so no, you can't change this.

Stefan Cameron obtained his bachelor's degree with Honors in Computer Science at the University of Ottawa and is a Computer Scientist working on Adobe's LiveCycle server products, in particular on LiveCycle Designer ES for the past 5 years.

StevenD
Registered: Oct 6 2006
Posts: 368
I don't know if this is what you are looking for but I wonder if you mean being able to visibly number rows. In other words let's say you have a table with 6 rows and you want each row to show a number starting with 1 going to 6 like line items. And you want to be able to add more rows to the table dynamically and have each new row be numbered ( 7, 8, 9 etc.).

Just put the following script in the calculate event for number field. Be sure and take out the comment marks (ie. "//") before each line.

//var myNum = Row1.index;
//this.rawValue = myNum + 1;

If you don't add 1 to the index number of table row instances then your number will start out as zero in the first instance and off by 1 for subsequent rows.

StevenD

goldie6175
Registered: Feb 26 2008
Posts: 38
It worked! You are an awesome wonderful person!!!! The form is here if you want to see it. It's pretty darn cute....

http://www.hmgc.mcw.edu/forms/ratform.pdf

Thanks!
StevenD
Registered: Oct 6 2006
Posts: 368
It is cute. It's nice to see a colorful form since most of the forms I work on are boring black and white things and the only splash of color I try and get away with is in the green print button and red reset form button.

Glad to have helped out.

StevenD