Dear All.
I'd like to calculate first column from 1 to N, when the Add Row button is clicked.
Please refer to followings
-------------------------------------- Code --------------------------------------
var nNodes = Test_Result1.sub_Product_accessories.Config_Acc.resolveNodes("Config_Acc[*]").length;
if (nNodes <= 6){
Test_Result1.sub_Product_accessories.Config_Acc.instanceManager.addInstance();
}
AS-IS
TO-BE
Solved! Go to Solution.
Views
Replies
Total Likes
On the Initialize event of the AccNum field out the javascript code:
this.rawValue= this.parent.index + 1
Views
Replies
Total Likes
There is a property of the instance Manager called count that will give you the number of rows that you have....
subformName.instanceManager.count
You can also ask for the index of a subform and it will indicate which instance number the object is within. So in your case you can add code to the Initialize event of the DD Object in the first column and ask for its parent.index .....so
this.parent.index
Note that the indexes are 0 based so you will have to add 1 to it after you get the value.
Hope that helps
Paul
Views
Replies
Total Likes
Dear Paul.
Thank you for your valuable comment.
Would i ask you one more question?
I've got the number of raw, but don't know how to add its number to add specific field which is added(Acc_Num).
also, if you don't mind, could you suggest a book of LiveCycle Designer to learn by myself.
------------------------------------------------------------- Code -----------------------------------------------------------------------
Test_Result1.sub_Product_accessories.Config_Acc.instanceManager.addInstance();
app.alert(Test_Result1.sub_Product_accessories.Config_Acc.instanceManager.count);
Views
Replies
Total Likes
On the Initialize event of the AccNum field out the javascript code:
this.rawValue= this.parent.index + 1
Views
Replies
Total Likes
Thanks Paul.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies