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?
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