KB-2025 Selecting and de-selecting all items in an editable grid results in an incorrect selection list

Symptoms

Selecting the 'select all' checkbox in an editable grid and then deselecting all items causes an incorrect selection list to be stored. See the example below.

Cause

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

Action

Use gridField() instead of gridLayout(). The gridField() function does not exhibit this abnormal behavior.

Alternatively, add the following to the gridLayout() SAIL code per the function documentation.

/* Flatten the selected values so the result is easier to work with */
/* when the select/deselect all option is used in an editable grid */
selectionSaveInto: a!save(local!selected, a!flatten(save!value)),

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: November 2019

Related
Recommended