Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

How to reference table rows added using addInstance?

Avatar

Level 2

OK, this one's probably quite simple, but I'm at wit's end . . . .

I have a table with body rows that can be added using addInstance.  what I can't figure out is how to reference the newly added rows and teh fields within them.  If the row reference for the inital row before addInstance is:

Table.Row1.CellName before the addInstance, after the addInstance wouldn't it be Table1.Row1[0].CellName and the newly added row be Table1.Row[1].CellName?  I try that and the debugger tells me that Table1.Row1[1].CellName has no properties.

I basically need to determine whether the user has filled out anything in the added rows and I'm having a devil of time figuring out how to reference the added rows and their cells.  Thanks in advance!

2 Replies

Avatar

Former Community Member

Your logic is correct but to reference that som expression you woudl have to use this notation:

xfa.resolveNode("Table1.Row[1].CellName").method or property

The reason for this is the use of the square brackets. Javascript interprets this an an array. When you use the resolveNode method you can pass a string and hence the square brackets get interpretted correctly.

Paul

Avatar

Level 2

D'oh!

Dang, I knew that -- talk  about a "brain lock."    Thanks.