Expand my Community achievements bar.

Cell names in Dynamic table with add row to be linked to Drop Down

Avatar

Level 1

I have created a table in LiveCycle ES2 with buttons to add/remove rows. In addition, I have a drop down box that contains currency and I have been trying to link the table and drop down box so that every time I select a currency, the Caption in the first cell of each row changes to the currency selected. For example if USD is selected in the drop down box, the caption of all cells in the Column 1 will change. I have managed to get it working for a static table however, for a dynamic table every time I add a row, the new row does not have cells named as Cell1, Cell2 etc. and my code therefore does not recognize the cell and does not change the caption.

if (this.rawValue == 1);

{

for (var i=0; i< 10; i++)

    {

       xfa.resolveNode("Subform1.Table1.Row1[" + i + "].Cell1.caption.value.#text").value = "USD";

    }

}

Can anyone please help?

Qaisar

1 Reply

Avatar

Level 1

I have figured out a possible solution and this is working for me even though I am not sure this may be the best solution. The key is to drop a numeric or text field on to the cell in the first column and change the name. Every time a new row is copied the name stays the same and therefore the Row1[" + i +"] can be used in a for loop.

http://forms.stefcameron.com/2009/02/25/expandable-table-with-totals/