Free cookie consent management tool by TermsFeed

About Queries

On This Page

Overview

Queries are the unseen driver of the robust interfaces, process models, and expressions in your applications. They allow you to easily select, aggregate, filter, and sort your enterprise data so you display data exactly how you need it.

This page provides an overview of the data you can query, the types of queries you can create, and tips on how to get started.

What data to query

In Appian, you can query data from a record type or a data store entity. You can query the data you need using different functions, components, and the query editor.

In Appian, you can query data from the following objects:

Record Type Object IconRecord types: Allows you to return data from a database or web service.


Data Store Object IconData store entity (DSE): Allows you to return data from a database table or view.


The fastest and easiest way to query data is from a record type since you can easily reference data and related data at the same time, and leverage auto-optimized query performance.

Tip:  For slower queries, consider using a!asyncVariable() to load the data asynchronously. This allows users to interact with the rest of the interface while waiting for the data to load. See Asynchronous Loading for more information.

Types of queries

You can create two different types of queries to return data from a record type or a data store entity. You’ll use different functions to create these two different types of queries:

Query Type

Description

Selection Returns a list of fields from a record type or entity. For example, a selection query could return a list of employees.
Aggregation Groups data by common values and performs calculations on the data. For example, an aggregation query could return the count of employees who are in the Engineering department.

How to query data

The table below outlines the different functions you can use to query data from a record type or a data store entity:

Action

Suggested Function

Selection queries
Return a list of data from a record type a!queryRecordType()
Return the data for a single record a!queryRecordByIdentifier()
Return a list of data from a data store entity a!queryEntity() configured with a!query() and a!querySelection().
Aggregation queries
Aggregate data from a record type a!queryRecordType() configured with a!measure() and a!grouping()
Aggregate data from a record type to display in a grid or chart a!recordData()
Aggregate data from a data store entity a!queryEntity() configured with a!query() and a!queryAggregation().
Filter, sort, and limit returned data
Filter the data returned from a record type or data store entity a!queryFilter()
Filter the data returned from a one-to-many related record type a!relatedRecordData()
Filter the data returned from a record type or data store entity by multiple conditions a!queryLogicalExpression()
Sort the data returned in a query a!sortInfo()
Determine where to start the query and how many rows to return a!pagingInfo()

Feedback