Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to remome table rows programmatically?

Avatar

Avatar
Level 4
_Bill_Bain_
Level 4

Likes

0 likes

Total Posts

79 posts

Correct Reply

0 solutions
View profile

Avatar
Level 4
_Bill_Bain_
Level 4

Likes

0 likes

Total Posts

79 posts

Correct Reply

0 solutions
View profile
_Bill_Bain_
Level 4

01-12-2008

I have a table with various product codes and prices in the rows. depending on whether the user has checked (or unchecked) the product descriptions on another subform, I would like to remove (or hide) the rows corresponding to the unchecked product descriptions.



As an example, the table name is Table2, and the first row beneath the header is Row1[0]. The table is located on subform Exhibit_C.



simply placing this script (I'll add the conditional later -- I just want to understand how to manipulate the table rows at this point):



form1.Exhibit_C.Table2.Row1[0].removeInstance(true)



on the appropriate checkbox ("Heart_Failure") gives the following error in the Javascript debugger when the check box is checked:



1:XFA:form1[0]:Heart_Failure[0]:changeException in line 1 of function top_level, script XFA:form1[0]:Heart_Failure[0]:change



form1.Exhibit_C.Table2.Row1[0] has no properties

1:XFA:form1[0]:Heart_Failure[0]:change



Usually when an object has no properties, it's because I've mis-spelled an object name, but not in this case. I'm baffled.



Thanks in advance!



Bill

Replies

Avatar

Avatar
Level 4
_Bill_Bain_
Level 4

Likes

0 likes

Total Posts

79 posts

Correct Reply

0 solutions
View profile

Avatar
Level 4
_Bill_Bain_
Level 4

Likes

0 likes

Total Posts

79 posts

Correct Reply

0 solutions
View profile
_Bill_Bain_
Level 4

01-12-2008

Found my own error -- need to use xfa.resolveNode due to the square brackets.