You are here:
CRM Analytics Quick Sort: Limitations and Guidance
CRM Analytics offers a powerful quick sort feature, enabling users to sort data directly within table and chart widgets by clicking column headers. However, some query configurations can interfere with this functionality. This document outlines known limitations and provides best practices for effective use of the quick sort feature.
Quick sort is disabled in the following scenarios due to technical conflicts that may result in query failures.
- SAQL Queries with
unionstatements - SAQL Queries with
foreachororderby containing bound interactions- Where selection bindings lead to changes in projected columns
- Examples include
{{cell(...)}}used inforeachororderclauses
- Fully Bound SAQL Queries
- If key operations, such as
group,foreach, ororderare entirely bound, the system cannot reliably interpret or sort them - Partially bound queries support quick sort
- If key operations, such as
- PIGQL Queries
- Quick sort isn't supported due to the static nature of PIGQL
- Direct Queries (Salesforce/Snowflake/Data 360/Google BigQuery)
- Quick sort doesn't support server-side sorting for these query types
Compact Forms
- Compact Form 1.0
- When
subtotalis enabled, it introduces implicit bindings that interfere with sorting
- When
- Compact Form 2.0
- When
columnTotalis enabled andgroup,columnTotal, orsubtotalcontain any form of a binding
- When
Why These Limitations Exist
Previously, CRM Analytics included automatic quick sort detection. However, this feature prevented some valid use cases, especially utilizing advanced bindings. Examples include:
- Dependence on fully bound queries
- Previous attempts to enable partial support, such as disabling only when an order clause was bound, resulted in runtime errors, particularly when bindings dynamically altered projected columns
Quick Sort Best Practices
- Use partially bound queries wherever possible if sorting is required
- Test quick sort behavior when changes are made to selection bindings, particularly
within
foreachororderby statements - If you intend to use quick sort, don't fully bind entire SAQL operations such as
group,foreach, ororder
Works with Quick Sort:
q = group q by {{cell(Step.selection, 0, "groupField").toString()}};
q = foreach q generate q.'Industry' as 'Industry', count(q) as 'Count';
Fails with Quick Sort:
q = foreach q generate {{cell(Step.selection, 0, "projection").toString()}};

