1 Reply Latest reply on Aug 25, 2009 1:45 PM by gkaiseril

    For Statement on a table using add.instances - need help




      I made this table in an acrobat form.   The table uses java script to add rows .   The code I used is:




      There are two fields on this table that I want to evaluate 1)  an index named



      and 2) the value named numAmount


      The script I am using to evaluate these to fields is as follows:

      if (form1.Page1.Subform1.Capital1.Capital1.detail.index1.rawValue ==2)


          $.rawValue = form1.Page1.Subform1.Capital1.Capital1.detail.index1.numAmount.rawValue 



      My problem is that I need to nest this if statement inside some kind of a loop.    I want the program to look at my table, determine how many instances the user has added,  scroll through the table and look at index1,  if index 1 = 2 then i want it to return the value in numAmount.


      I just can't get the syntax to work in either form calc or javascript.


      I am trying to write this code using the calculate method on a fourth field located on



      I have attached the file if it helps.   The table is on page one of the form and the display field is on page three. 


      Any help would be much appreciated!!!