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

My use of a floating field is not working.

StevenD
Registered: Oct 6 2006
Posts: 368
Answered

I'm trying to use a floating text field make a sequence or incrementing number that will get the index number of subforms as they are added. So I would get the following text display in a text object with "-#" changing.

Identify the Target Unit-1
Identify the Target Unit-2
Identify the Target Unit-3
ect.

Here is the code I have put in the calculate event for the floating field.

//var myNum = xfa.form.form1.MainPageSF.UnitNeed2.index;
//rawValue = myNum + 1;

The result I am getting is,

Identify the Target Unit-1
Identify the Target Unit-1
Identify the Target Unit-1
etc.

What is wrong with the code or method I am using?

StevenD

My Product Information:
Acrobat Pro Extended 9.0, Windows
StevenD
Registered: Oct 6 2006
Posts: 368
Oh well. I seem to have figured it out.

Instead of using the line,
//var myNum = xfa.form.form1.MainPageSF.UnitNeed2.index;

I used,
//var myNum = Row1.parent.parent.index;

and it seems to be working.

StevenD