Repeat date same as the repeating row above



I created a Travel Expense Report.

The user enters receipt information on each row.

They click a button to add another row and another receipt.

The first cell (Column A Row 1) is a auto-generated row number (1,2,3, etc...) based on the instanceManager count.

I would like to make this numbered cell a button that the user can click to add the same date they entered in the row above.

I know how to number it by using the caption, but cannot figure out how to do the rest of the script.


Accepted Solutions (1)

Accepted Solutions (1)




Assuming the row is named 'Row' and the date field 'DateField' the script in FormCalc will be:

DateField = Row[-1].DateField

In JavaScript it will be a bit more complex:

DateField.rawValue = Table.resolveNode("Row[" + (this.parent.index - 1) + "]").DateField.rawValue;