Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Copy to the last row a table


Level 1


I have created a table that adds a row when clicking on a button. The next step for me is to copy the information I have in some fields to the correspondent columns of the created row( last row) of the table. Since the row number alters I don't know how to do that.


1 Reply


Level 10


The addInstance() method returns the same object as if you have executed a resolveNode targeting the row added.  So if your row was called Row1 and contained a cell with a field called TextField1 then you could add a row and set the field's value with code like;

var newRow = Table1._Row1.addInstance();

newRow.TextField1.rawValue = "some information";