=load( local!statusFilter:{0,1}, local!User, local!gridSelection: a!gridSelection( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 25 )), local!selectedTaskIds, local!UserList:apply(rule!APN_displayUser,cons!USERS_LIST), local!pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 20), with( local!report: a!queryProcessAnalytics( report: cons!ALL_ACTIVE_TASKS_REPORT, query: a!query(pagingInfo: local!pagingInfo, logicalExpression: a!queryLogicalExpression( operator: "AND", filters: { if(rule!APN_isBlank(local!User),{}, a!queryFilter( field: "c1", operator: "=", value: local!User ) ), a!queryFilter( field: "c5", operator: "in", value: {0,1} ) } )) ), /* local!datasubset:todatasubset(local!Document_Detail_Statuses, topaginginfo(1,20) ), */ a!formLayout( label: "", instructions: "", firstColumnContents: { a!sectionLayout( label: "Task Filters", firstColumnContents: { a!dropdownField( label: "Users", placeholderLabel:"All", choiceLabels: local!UserList, choiceValues: cons!USERS_LIST, value:local!User, saveInto: local!User )/*, a!dropdownField( label: "Status", placeholderLabel:"All", choiceLabels: { "Assigned", "Accepted", "Completed", "Not Started","Cancelled","Paused", "Unattended", "Aborted", "Cancelled By Exception", "Submitted", "Running", "Error" }, choiceValues: {0,1,2,3,4,5,6,7,8,9,10,11}, value: local!statusFilter, saveInto: local!statusFilter ) */ }, secondColumnContents: { } ),/*, a!textField( label: "Data", readOnly: true, value: local!datasubset ),*/ a!sectionLayout( label: "Task List", firstColumnContents: { a!gridField( label: local!report.name, instructions: local!report.description, totalCount: local!report.totalCount, columns: { a!gridTextColumn( label: "Task Name", field: "TaskName", data: index(local!report.data, "c0", {}) ), a!gridTextColumn( label: "Assigned To", field: "AssignedTo", data: apply(rule!APN_displayUser,{index(local!report.data, "c1", {})}) ), a!gridTextColumn( label: local!report.columnConfigs[3].label, field: local!report.columnConfigs[3].field, data: index(local!report.data, "c2", {}) ), a!gridTextColumn( label: local!report.columnConfigs[4].label, field: local!report.columnConfigs[4].field, data: index(local!report.data, "c3", {}) ), a!gridTextColumn( label: local!report.columnConfigs[6].label, field: local!report.columnConfigs[6].field, data: apply(rule!getTaskStatusDisplay,index(local!report.data, "c5", {})) ), a!gridTextColumn( label: local!report.columnConfigs[4].label, field: local!report.columnConfigs[4].field, data: index(local!report.data, "c7", {}) ), identifiers: index(local!report.data, "c7" , {}), value: local!gridSelection, saveInto: { local!gridSelection, a!save(local!selectedTaskIds, index(save!value, "selected", null)) }, selection: true() } )} ) } )))