Hi TeamI have an existing report, "All Tasks", which is an ARF file, of course.I am able to configure filters on the report to customise the report.My requirement is to show the report in a UI so a team lead can see what tasks have been, by whom, whether it is complete, and the duration of the task.
Downloading the report and converting it to Excel is not an option - the requirement is to view the report on my site.I have an interface with a read-only grid that returns exactly the information required.Is it possible to add filters to a report backed UI?If so, how do I go about it?Thanks and blessings
Stephen
Discussion posts and replies are publicly visible
a!localVariables( local!datasubset: rule!AT_processTaskReport( taskName_txt: ri!taskName_txt, status_int: ri!status_int, owner_txt: ri!owner_txt, assignee_txt: ri!assignee_txt ), a!sectionLayout( label: "", labelColor: "SECONDARY", contents: { rule!APP_uiInterfaceHeader(text: "Tasks Overview"), a!sectionLayout( label: "", contents: { a!gridField( label: "", emptyGridMessage: "No task history available", data: local!datasubset.data, columns: { a!gridColumn( label: "Reference Number", sortField: "", value: fv!row.c1 ), a!gridColumn( label: "Task Name", sortField: "", value: fv!row.c2 ), a!gridColumn( label: "Assigned On", sortField: "", value: text(fv!row.c6, "D MMM YYYY, HH:MM") ), a!gridColumn( label: "Assigned To", sortField: "", value: a!richTextDisplayField( value: { a!localVariables( local!showGroupMembers, local!group: if( a!isNullOrEmpty(togroup(fv!row.c14)), null, a!groupMembers(togroup(fv!row.c14)).data ), local!groupMembers: if( a!isNullOrEmpty(local!group), null, a!forEach( items: local!group, expression: a!richTextItem( text: joinarray( { user(fv!item, "firstName"), user(fv!item, "lastName") }, " " ) ) ) ), { a!richTextItem( text: rule!APP_displayUserOrGroup(fv!row.c14) & " " ), a!richTextIcon( icon: if( isnull(local!showGroupMembers), "expand", "compress" ), caption: if( isnull(local!showGroupMembers), "Expand group", "Collapse group" ), link: a!dynamicLink( saveInto: if( isnull(local!showGroupMembers), a!save(local!showGroupMembers, true), a!save(local!showGroupMembers, null) ) ), showWhen: a!isNotNullOrEmpty(togroup(fv!row.c14)) ), a!richTextBulletedList( items: local!groupMembers, showWhen: a!isNotNullOrEmpty(local!showGroupMembers) ) } ) } ) ), a!gridColumn( label: "Claimed By", value: a!richTextDisplayField( value: a!richTextItem( text: a!defaultValue( rule!APP_displayUserOrGroup(fv!row.c14), "-" ) ) ), align: "CENTER" ), a!gridColumn( label: "Started On", sortField: "", value: text(fv!row.c7, "D MMM YYYY, HH:MM") ), a!gridColumn( label: "Completed On", sortField: "", value: if( a!isNullOrEmpty(fv!row.c8), "Not Completed", text(fv!row.c8, "D MMM YYYY HH:MM") ) ), a!gridColumn( label: "Task Duration", sortField: "", value: with( local!interval: tointervalds(fv!row.c9), local!days: tointeger( split(tostring(local!interval), "::")[1] ), local!hours: tointeger(split(tostring(local!interval), ":")[3]), local!minutes: tointeger(split(tostring(local!interval), ":")[4]), local!seconds: tointeger(split(tostring(local!interval), ":")[5]), if( local!days = 0, "", local!days & if(local!days = 1, " day, ", " days, ") ) & if( and(local!days = 0, local!hours = 0), "", local!hours & if(local!hours = 1, " hour, ", " hours, ") ) & if( and( local!days = 0, local!hours = 0, local!minutes = 0 ), "", local!minutes & if( local!minutes = 1, " minute, ", " minutes, " ) ) & local!seconds & if(local!seconds = 1, " second", " seconds") ) ) } ) } ) } ) )
We would like to see the code inside "AT_processTaskReport".
My humblest apologies, Stefan, my mind was on the fritz and I did not click what you were asking for.Here is the code as it stands now - I went back in and set it up exactly as Harshit wad written it, and I am now seeing the data in my interface:
a!queryProcessAnalytics( report: cons!AT_REPORT_ALL_TASKS, contextProcessModels: rule!AT_getAllProcessModels(), query: a!query( logicalExpression: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "c0", operator: "includes", value: ri!taskName, applyWhen: a!isNotNullOrEmpty(ri!taskName) ), a!queryFilter( field: "c1", operator: "in", value: ri!status, applyWhen: a!isNotNullOrEmpty(ri!status) ), a!queryFilter( field: "c5", operator: "=", value: ri!owner, applyWhen: a!isNotNullOrEmpty(ri!owner) ) }, logicalExpressions: a!queryLogicalExpression( operator: "OR", filters: a!forEach( items: ri!assignee, expression: a!queryFilter( field: "c4", operator: "includes", value: concat(tostring(fv!item), ";"), applyWhen: a!isNotNullOrEmpty(fv!item) ) ) ) ), pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 100, sort: a!sortInfo(field: "c3", ascending: false) ) ) )
No problem :-) Great you sorted it out.