KB-1945 Unexpected sort ordering when using a!queryEntity

This issue has been resolved in a new Appian version. Please upgrade to the latest version of Appian.

Symptoms

When using a!queryEntity without a sortInfo parameter specified, a seemingly arbitrary sort order is applied to the data. Specifically, the following behaviors are seen:

  1. If no a!querySelection is present, the result set is sorted on the last column of the CDT representing the table.
  2. If a a!querySelection is present, the result set is sorted on the first a!queryColumn value specified in the definition.

As a result of this, performance issues may be observed if the query returns a lot of data or is sorting by a text column.

Cause

This issue has been resolved via AN-128642 in Appian 22.3 GA.

Action

Upgrade to Appian 22.3.

Workaround

Sorting by the primary key is typically the most efficient sort order. Thus, a sort parameter referencing the primary key should be set for the pagingInfo used by the queryEntity.

Affected Versions

This article applies to Appian 22.2 and earlier.

Last Reviewed: November 2022

Related
Recommended