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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to remome table rows programmatically?

_Bill_Bain_
Level 4
Level 4
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
1 Reply
_Bill_Bain_
Level 4
Level 4
Found my own error -- need to use xfa.resolveNode due to the square brackets.