=load( local!data: queryrecord( recordType: cons!CI_ManualPreviewRecord, query: 'type!{http://www.appian.com/ae/types/2009}Query'( 'selection|aggregation': 'type!{http://www.appian.com/ae/types/2009}Aggregation'( columns: { 'type!{http://www.appian.com/ae/types/2009}AggregationColumn'( field: "flagType", alias: "label", visible: true, isGrouping: true ), 'type!{http://www.appian.com/ae/types/2009}AggregationColumn'( field: "recordId", alias: "data", visible: true, aggregationFunction: "COUNT" ) } ),a pagingInfo: a!pagingInfo( startIndex: 1, batchSize: -1, sort: a!sortInfo( field: "label", ascending: true ) ) ) ).data, a!pieChartField( series: local!data, showDataLabels: true ) )