You can add or remove tables, body rows, header rows, and footer rows by adding instance manager scripting expressions to objects on your form using the Script Editor.
• If it is not already visible, display the Script Editor by selecting Palettes > Script Editor. Expand the Script Editor so that it is displayed in multiline view.
• Ensure that the table that you want to add instances to is contained within a flowed subform so that you can add new instances of either the table or the rows within the table.
1. Select the object on your form design that you want to add the script to and select an event from the Show list in the Script Editor.
2. Type one of the following scripts in the Script Editor, where Table1 and Row1 are the names of the table and table row to add instances to:xfa.form.recalculate(true) // Invoke the recalculate method to include the field values from the added table or row in the form calculations.xfa.form.recalculate(true) // Invoke the recalculate method to include the field values from the added table or row in the form calculations.xfa.form.recalculate(true); // Invoke the recalculate method to include the field values from the added table or row in the form calculations.xfa.form.recalculate(true); // Invoke the recalculate method to include the field values from the added table or row in the form calculations.
1. Select the object on your form design that you want to add the script to and select an event from the Show list in the Script Editor.
2. Type one of the following scripts in the Script Editor, where Table1 and Row1 are the names of the table and table row to remove instances from and integer is the zero-based index number of the instance to remove: