Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Need Script help for button in expanding table

Avatar

Level 1

Hi, I've created an expanding table with the add remove buttons. In my table I also have a button to open a list box, when making a selection form the list box 1, it opens list box 2, when making this selection it auto populates a textfield in the first row. The issue I'm having is when I add a new row to my table and click on the button on the second row it will auto populate the textfield on the first row instead of the second row. What am I missing?

 

Script – Button on table:

this.resolveNode("mainList").presence = "visible";
this.resolveNode("list10").presence = "hidden";
this.resolveNode("list12").presence = "hidden";

 

Script on list one (mainList): 

if ((((xfa.host.version < 8.1 || xfa.host.version >= 9) && $.boundItem(xfa.event.newText) == "1") || ((xfa.host.version >= 8.1 && xfa.host.version < 9) && xfa.event.newText == "1"))) {
this.resolveNode("$").presence = "hidden";
this.resolveNode("list10").presence = "visible";
this.resolveNode("list12").presence = "hidden";
}
else if ((((xfa.host.version < 8.1 || xfa.host.version >= 9) && $.boundItem(xfa.event.newText) == "2") || ((xfa.host.version >= 8.1 && xfa.host.version < 9) && xfa.event.newText == "2"))) {
this.resolveNode("$").presence = "hidden";
this.resolveNode("list10").presence = "hidden";
this.resolveNode("list12").presence = "visible";
}
else if ((((xfa.host.version < 8.1 || xfa.host.version >= 9) && $.boundItem(xfa.event.newText) == "3") || ((xfa.host.version >= 8.1 && xfa.host.version < 9) && xfa.event.newText == "3"))) {
this.resolveNode("$").presence = "hidden";
this.resolveNode("list15").presence = "visible";
}

 

Scritp on list two to auto populate textfield:

if ((((xfa.host.version < 8.1 || xfa.host.version >= 9) && $.boundItem(xfa.event.newText) == "1202") || ((xfa.host.version >= 8.1 && xfa.host.version < 9) && xfa.event.newText == "1202"))) {
this.resolveNode("$").presence = "hidden";
this.resolveNode("allProd.prod.LOField").rawValue = "1202";
}
else if ((((xfa.host.version < 8.1 || xfa.host.version >= 9) && $.boundItem(xfa.event.newText) == "1203") || ((xfa.host.version >= 8.1 && xfa.host.version < 9) && xfa.event.newText == "1203"))) {
this.resolveNode("$").presence = "hidden";
this.resolveNode("allProd.prod.LOField").rawValue = "1203";
}

 

0 Replies