= load( local!pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 50, sort: a!sortInfo( field: "c3", ascending: false ) ), local!statusFilter: null, local!process, local!task, local!assigned, local!accept, /*totalCountOfRecordsInAllTasksReport - Integer variable used to maintain the total count of records. Time consumed by this query is very very minimal as the batch size is 1. */local!totalCountOfRecordsInAllTasksReport: a!queryProcessAnalytics( report: cons!ALL_TASK_REPORT, query: a!query( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 1 ) ) ).totalCount, /*additionalFilters - Array variable used to maintain the array of user filters surfaced on the interface*/local!additionalFilters: null, /*allTasksReportData - Any Type variable used to maintain the resultant dataset post recursive call of a!queryProcessAnalytics()*/local!allTasksReportData: rule!CMN_queryProcessAnalyticsRecursively( report: cons!ALL_TASK_REPORT, totalCount: a!queryProcessAnalytics( report: cons!ALL_TASK_REPORT, query: a!query( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 1 ) ) ).totalCount, additionalFilters: local!additionalFilters, resultantData: null, identifierField: "c0"/*NOTE: Please substitute a value which identifies a record uniquely in the report, for instance pp!id in process report, tp!id in task report */ ), with( local!datasubset: todatasubset( local!allTasksReportData, local!pagingInfo ), a!dashboardLayout( firstColumnContents: { a!sectionLayout( firstColumnContents: { a!dropdownField( label: "Status", choiceLabels: { "Assigned", "Accepted", "Completed" }, choiceValues: enumerate( 3 ), placeholderLabel: "All", value: local!statusFilter, saveInto: { local!statusFilter, a!save( local!pagingInfo.startIndex, 1 ), a!save( local!additionalFilters, if( and( isnull( local!statusFilter ), isnull( local!task ), isnull( local!assigned ), or( isnull( local!accept ), local!accept = "" ) ), null, { if( isnull( local!statusFilter ), null, a!queryFilter( field: "c1", operator: "=", value: local!statusFilter ) ), if( isnull( local!task ), null, a!queryFilter( field: "c6", operator: "includes", value: local!task ) ), if( or( isnull( local!accept ), local!accept = "" ), null, a!queryFilter( field: "c4", operator: "in", value: local!accept ) ), if( isnull( local!assigned ), null, a!queryFilter( field: "c5", operator: "=", value: local!assigned ) ) } ) ), /*Line #139 - #156 represents the code that refreshes the dataset every time by querying the process analytics recursively. This is a very costly query, so I would like to suggest perform this kind of activity by using a button (Name it as 'Search') and upon clicking the 'Search' button execute the below snippets. Because executing this code snippet upon selecting each filter causes the significance degradation in performance.*/a!save( local!allTasksReportData, rule!CMN_queryProcessAnalyticsRecursively( report: cons!ALL_TASK_REPORT, totalCount: a!queryProcessAnalytics( report: cons!ALL_TASK_REPORT, query: a!query( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 1 ) ) ).totalCount, additionalFilters: local!additionalFilters, resultantData: null, identifierField: "c0"/*NOTE: Please substitute a value which identifies a record uniquely in the report, for instance pp!id in process report, tp!id in task report */ ) ) } ), a!textField( label: "Search By Task Display Name", value: local!task, refreshAfter: "KEYPRESS", saveInto: { local!task, a!save( local!pagingInfo.startIndex, 1 ) } ) }, secondColumnContents: { a!pickerFieldUsersAndGroups( label: "Filter by Assigned To", value: local!accept, maxSelections: 1, saveInto: { local!accept, a!save( local!pagingInfo.startIndex, 1 ) } ), a!pickerFieldUsers( label: "Accepted By", value: local!assigned, maxSelections: 1, saveInto: { local!assigned, a!save( local!assigned, tostring( save!value ) ), a!save( local!pagingInfo.startIndex, 1 ) } ) } ), a!sectionLayout( firstColumnContents: { a!gridField( label: local!datasubset.name, totalCount: local!datasubset.totalCount, columns: { apply( rule!util_portalReportColumn( columnConfig: _, data: local!datasubset.data ), local!datasubset.columnConfigs ) }, value: local!pagingInfo, saveInto: { local!pagingInfo } ) } ) } ) ) )