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.

We're facing problem with SAIL Grid when sorting grid data on header click.

We're facing problem with SAIL Grid when sorting grid data on header click. However default sorting is working when grid renders first time. Please find the case explained below.

We're fetching data from query record and displaying it in a SAIL grid after aggregation.

When we click at the grid's header, sorting doesn't work, it gives exception i.e. "Expression evaluation error at function 'todatasubset' [line 35]: Error evaluating function 'todatasubset' : java.lang.IllegalArgumentException: The given data type is not a record type: Dictionary (id=94)".

When we use query rule to fetch the data instead of query record it works properly.

Reason why we're using query record is that we're doing aggregation / grouping on data.

Please provide some suggestion to this exception or alternate solution to fetch data in aggregate / grouped form from database.

For your reference please find sample code below.

load(
local!pagingInfo: topaginginfo(1,10), ...

OriginalPostID-93073

OriginalPostID-93073

  Discussion posts and replies are publicly visible

Parents
  • ...
    local!querydata:queryrecord(
    recordType: cons!COMPANY_AUDIT_LOG,
              query: 'type!{www.appian.com/.../2009}Query'(
              'selection|aggregation': 'type!{www.appian.com/.../2009}Aggregation'(
              columns: {
              'type!{www.appian.com/.../2009}AggregationColumn'(
              field: "full_name",
              alias: "label",
              visible: true,
              isGrouping: true
              ),
              'type!{www.appian.com/.../2009}AggregationColumn'(
              field: "no_of_company_count",
              alias: "data",
              visible: true,
              aggregationFunction: "SUM"
              )
              }
              ),          
              pagingInfo:
              a!pagingInfo(
              startIndex: 1,
              batchSize: -1,
              sort: a!sortInfo(
              field: "label",
              ascending: true
              )
              )
              )
              ),
              with(
    local!data:todatasubset(local!querydata.data,local!pagingInfo),
              a!formLayoutColumns(                               
              instructions: "In this report we can view the # of co...
Reply
  • ...
    local!querydata:queryrecord(
    recordType: cons!COMPANY_AUDIT_LOG,
              query: 'type!{www.appian.com/.../2009}Query'(
              'selection|aggregation': 'type!{www.appian.com/.../2009}Aggregation'(
              columns: {
              'type!{www.appian.com/.../2009}AggregationColumn'(
              field: "full_name",
              alias: "label",
              visible: true,
              isGrouping: true
              ),
              'type!{www.appian.com/.../2009}AggregationColumn'(
              field: "no_of_company_count",
              alias: "data",
              visible: true,
              aggregationFunction: "SUM"
              )
              }
              ),          
              pagingInfo:
              a!pagingInfo(
              startIndex: 1,
              batchSize: -1,
              sort: a!sortInfo(
              field: "label",
              ascending: true
              )
              )
              )
              ),
              with(
    local!data:todatasubset(local!querydata.data,local!pagingInfo),
              a!formLayoutColumns(                               
              instructions: "In this report we can view the # of co...
Children
No Data