Expand my Community achievements bar.

Instance evaluation

Avatar

Level 3

Hi all,

I have a form with two tables. The table on the first page has a repeatable row with a dropdown that indicates whether a part is "New" or "Change". In a subform on the second page, I have a number of tables equal to the max # of instances of the row in table 1, all set to Hidden. When the user opens the form, all they see is the first table on the first page. When the dropdown in the first table is set to "Change," I want to evaluate what the parent row instance is and then show the corresponding instance of the table of page 2 (Note: I can do this by placing an if statement in each of the tables on the second page that anticipates the corresponding instance of the row on page one, but it would be much simpler to not do that). I tried using the following code, but it doesn't seem to work:

for (i = 0; i < DispositionTable.Row1.count; i++) {

    if (this.parent.index === i) {

        if ($.boundItem(xfa.event.newText) == "1") {

            this.resolveNode("form1.subform1.ECO_table[" + i.toString() + "]").presence = "visible";

        }

    }

}

Also, and this is where it gets tricky, when the dropdown is set to "New," I want to hide the corresponding table on page two and evaluate whether any other instance of the row is set to "Change." If none are marked as "Change," then the subform containing all of the tables should also be hidden (there is a page break before, so when it is visible I am left with a blank page). I can't figure out a way to specify in the change event that when the dropdown is set to "New" and all other instances of the row are already set to new, then the code should run. Any ideas?

0 Replies