Adding multiple rows to an inline editable grid without adding data before each new row results in overwriting data due to indexing issues. Any new data will repeatedly write over the data from the first row of the block of newly added rows. This behavior does not persist if adding data to each row before creating a new row.
This issue has been reported to the Appian Product Team. The reference number for this issue is AN-97061.
Make the Add Row link visible only if all rows have a value. Here is some sample SAIL code to modify for one method to achieve this functionality:
addRowlink: if(and(a!forEach(items:local!myRows, expression: not(fv!item = ""))), a!dynamicLink( .... ), null)
Alternatively, change the value and saveInto parameters of the field referenced in a!gridRowLayout to be ri!data[fv!index].cdtField:
value
saveInto
a!gridRowLayout
ri!data[fv!index].cdtField
a!gridRowLayout( contents: { a!textField( required: true, value: ri!data[fv!index].cdtField, saveInto: ri!data[fv!index].cdtField ) })
This article applies to Appian 17.2 and later.
Last Reviewed: March 2018