Highlighted

How to remome table rows programmatically?

Avatar

Avatar

_Bill_Bain_

Avatar

_Bill_Bain_

_Bill_Bain_

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

Highlighted

Avatar

Avatar

_Bill_Bain_

Avatar

_Bill_Bain_

_Bill_Bain_

01-12-2008

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