Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

clintalba
Level 1
Level 1

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
Rakhi_Sukhadeve
Correct answer by
Level 2
Level 2

@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

0 Replies
Rakhi_Sukhadeve
Correct answer by
Level 2
Level 2

@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