Table.replaceTable

Removes all existing rows and copies rows from the table specified by fromTable. This method is equivalent to calling copyTable(fromTable, true). Rows flagged as empty in fromTable are ignored. Any rows in fromTable that have been deleted using the #deleteRow() method are ignored. All other rows are copied.

All columns having the same name in each table are copied e.g. if T1 has columns A, B, C, D and T2 has columns B, C, X, Y, T1.replaceTable(T2) will result in data from columns B and C being copied. Any other columns in T1 will be set to null or the column's default value. The current row (see #getCurrentRow()) is set to the first row after the copy.

The table specified by fromTable is unaffected and is not changed in any way.

Further documentation.

Javascript example:

 tables.ORDERS.replaceTable(tables.ORDERS_SAVE);
 

Parameters

Table fromTable,