= load( local!selectedCode: "0_0", local!page: a!pagingInfo( startIndex: 1, batchSize: 5 ), a!dashboardLayoutColumns( columns: { a!columnLayout( Contents: { with( local!data: queryrecord( recordType: ri!recordName, 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: "BusinessCode", alias: "label", visible: true, isGrouping: true ), 'type!{http://www.appian.com/ae/types/2009}AggregationColumn'( field: "ClaimID", alias: "data", visible: true, aggregationFunction: "COUNT" ) } ), pagingInfo: a!pagingInfo( startIndex: 1, batchSize: - 1, sort: a!sortInfo( field: "label", ascending: true ) ) ) ).data, a!pieChartField( label: " Business Code : Number of Letters ", instructions: local!selectedCode & local!page, series: apply( rule!ACP_GetPieChartSeries2( label: _, data: _, saveInto: local!selectedCode, test:local!page ), merge( local!data.label, local!data.data ) ), showDataLabels: true, showTooltips: true ) ) } ) } ) ) -------------------------------------------------------------------------------------------- Definition of ACP_GetPieChartSeries2 =a!chartSeries( label: ri!label, data: ri!data, links: a!dynamicLink(value: ri!label, saveInto:{ri!saveInto,ri!test.startIndex<< rule!CP_returnFirstInputAsIs(1,_)}) )