How to reference table rows added using addInstance?

Avatar

Avatar
Level 1
w_bain
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
w_bain
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
View profile
w_bain
Level 1

18-08-2009

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!

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Level 1
w_bain
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
w_bain
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
View profile
w_bain
Level 1

20-08-2009

D'oh!

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

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

19-08-2009

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