Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Query Entity: fetchtotalcount is not working

Dear Team,

Could someone help me to understand the below issue please.

I am trying to fetch the total count of the records from DB view. When I give fetchTotalCount=true it's throwing an error 'Expression evaluation error at function a!queryEntity [line 2]: An error occurred while retrieving the data. Details: Unexpected error executing query'. If I change the fetchTotalCount=false, it's working fine. Sample  code is below:

a!queryEntity(
entity: cons!DB_VIEWS_DSE,
query: a!query(
selection:
a!querySelection(
columns: a!queryColumn(
field: "id"
)
),
pagingInfo:
a!pagingInfo(
startIndex: 1,
batchSize: 1,
sort: {
a!sortInfo(field: "id", ascending: false())
}
)
),
fetchtotalcount: true
)

  Discussion posts and replies are publicly visible

Parents Reply Children