You are currently reviewing an older revision of this page.

DRAFT KB-[SP-3142] totalCount returns incorrect results

Symptoms

Users may experience one or more of the following symptoms

Symptom 1

When querying a view or table, "totalCount" shows a different value than the actual number of results

Symptom 2

<SCREENSHOT OF NISHANTS CASE>

Cause

Expected behavior since fetchTotalCount determines results based on primary keys, and the primary key isn't unique

The database does not use the same field as the CDT for the primary key

Action

  1. Ensure the database and CDT use the same field for the primary key
  2. Update the affected view or table to have a unique, non-null primary key.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: May 2020