Designer / LiveCycle: Reference rows in dynamic table in a separate subform static table, For Loop Help | Community
Skip to main content
New Participant
April 30, 2020
Solved

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

  • April 30, 2020
  • 1 reply
  • 3816 views

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";
    }
}

and page 2

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Rakhi_Sukhadeve

@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-number-of-row-in-a-dynamic-table/td-p/93951

1 reply

Rakhi_SukhadeveAccepted solution
Employee
May 15, 2020

@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-number-of-row-in-a-dynamic-table/td-p/93951