You are currently reviewing an older revision of this page.

KB-1509 Adding multiple rows to an inline editable grid without adding the data causes data indexing issues

Symptoms

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. 

Cause

This issue has been reported to the Appian Product Team. The reference number for this issue is AN-97061.

Workaround

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:

a!gridRowLayout(
contents: {
a!textField(
required: true,
value: ri!data[fv!index].cdtField,
saveInto: ri!data[fv!index].cdtField
)
}
)

Affected Versions

This article applies to Appian 17.2 and later. 

Last Reviewed: March 2018