=load( local!pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 5), local!statusFilter: 0, with( local!report: a!queryProcessAnalytics( report: cons!BB_AllTask_Constant, contextProcessModels: cons!BB_PM, query: a!query(pagingInfo: local!pagingInfo) ), { a!dropdownField( label: "Status", choiceLabels: { "Assigned", "Accepted", "Completed", "Not Started" }, choiceValues: enumerate(4), value: local!statusFilter, saveInto: local!statusFilter ), a!gridField( label: local!report.name, instructions: local!report.description, totalCount: local!report.totalCount, columns:{ a!forEach( items: local!report.columnConfigs, expression: with( local!columnData: index(local!report.data, fv!item.field, {}), local!columnDataCount: count(local!columnData), a!gridTextColumn( label: fv!item.label, field: fv!item.field, data: if( local!columnDataCount > 0, a!forEach( items: local!columnData, expression: if( fv!item = "TASK_STATUS", index( { "Assigned", "Accepted", "Completed", "Not Started", "Cancelled", "Paused", "Unattended", "Aborted", "Cancelled By Exception", "Submitted", "Running", "Error" }, /* * Task status ids start with 0, so add one to reach the first index */ tointeger(index(local!columnData, fv!item + 1, -1 )), "Other" ), tostring(fv!item) ) ), {} ), links:{ if( fv!item.configuredDrilldown = "TASK_DETAILS", a!forEach( items: index(local!report.data, fv!item.drilldownField, {}), expression: a!processTaskLink(task: fv!item) ), null ), if( fv!item.configuredDrilldown = "User_Profile", a!forEach( items: index(local!report.data, fv!item.drilldownField, {}), expression: a!userRecordLink(label:rule!BB_Display_Full_Name_Multi(users:fv!item),user: fv!item) ), null ) } ) ) ) }, value: local!pagingInfo, saveInto: local!pagingInfo ) } ) )