Expand my Community achievements bar.

SOLVED

Designer / LiveCycle: Reference rows in dynamic table in a separate subform static table, For Loop Help

Avatar

Level 2

Reference pasted pictures below.

I have a cover page that summarizes data from my dynamic tables in a separate subform.  The behavior I want, after I update the dynamic subform, I want to hit an "Update" button on the coverpage that sets the data in the static tables.

1) I'm new to programming

2) I'm trying to use conditional loops with one variable to change the resolveNode search criteria (otherwise I could static code all 27 fields)

3) Here's the code associated with my "Update" button:

FCIF_Read_File_Index.CoverPage.CoverPage_Subform.Update::click - (JavaScript, client)

var i = 0,
j = "B";
  for ( i = 0; i<=2; i++ ) {
    if (j="R") {
      this.resolveNode("LatestR.Row1[i].Cell1").rawValue = this.resolveNode("FCIF_Read_File_Index.Rescinded_Subform.Rescinded.Row1[i].Cell2").rawValue;
      this.resolveNode("LatestR.Row1[i].Cell2").rawValue = this.resolveNode("FCIF_Read_File_Index.Rescinded_Subform.Rescinded.Row1[i].Cell3").rawValue;
      this.resolveNode("LatestR.Row1[i].Cell3").rawValue = this.resolveNode("FCIF_Read_File_Index.Rescinded_Subform.Rescinded.Row1[i].Cell5").rawValue;
    } else {
      this.resolveNode("Latest[j].Row1[i].Cell1").rawValue = this.resolveNode("FCIF_Read_File_Index.Part_[j]_Subform.Part_[j].Row1[i].Cell2").rawValue;
      this.resolveNode("Latest[j].Row1[i].Cell2").rawValue = this.resolveNode("FCIF_Read_File_Index.Part_[j]_Subform.Part_[j].Row1[i].Cell3").rawValue;
      this.resolveNode("Latest[j].Row1[i].Cell3").rawValue = this.resolveNode("FCIF_Read_File_Index.Part_[j]_Subform.Part_[j].Row1[i].Cell5").rawValue;
    }
    if (i=2 && j="B") {
      i=0;
      j="C";
    } else if ( i=2 && j="C" ) {
      i=0;
      j="R";
    }
}

clintalba_0-1588290334903.png

and page 2

clintalba_1-1588290400554.png

 

1 Accepted Solution

Avatar

Correct answer by
Employee

@clintalba There is a similar thread on this, you can refer at [1]

If you have any other related query, please share your form.

 

[1].https://experienceleaguecommunities.adobe.com/t5/adobe-livecycle-discussions/how-to-calculate-the-nu...

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

@clintalba There is a similar thread on this, you can refer at [1]

If you have any other related query, please share your form.

 

[1].https://experienceleaguecommunities.adobe.com/t5/adobe-livecycle-discussions/how-to-calculate-the-nu...