I have a template where there are row based formulas i.e. c2+d2 and g2 - e2

When I’m cloning and inserting new rows, how would I deal with the formulas like that? (because the clone logic is keeping the formula as is, and I need to update it to c[insert current row index here] + d[insert current row index here], for each row, and each row’s index may change as the document is built.

attached is a project for an example. if you look in the test.dot template, there are ‘row based’ formulas in 2 of the cells.

if you look in result.docx, they are clone, but the index part of the formula doesn’t update based on current row, and I need them to be updated.

fields.zip (38.6 KB)