Hi everyone,
I'm having a grid field that shows data from a process model based report by using a!queryProcessAnalytics() query. I set up a manual refresh button that updates a reference local variable's value (local!refreshCounter), so that whenever user clicks the refresh button, the report value will be updated if there is any new active process task.
However, the process was not refresh unless I refresh the whole page (F5).
I'm I doing it wrong?
a!localVariables( local!refreshCounter: 1, local!datasubset: a!refreshVariable(value: a!queryProcessAnalytics( report: <Report to query from>, contextProcessModels: <process model that report gets data from>, query: a!query( pagingInfo: a!defaultValue(ri!pagingInfo,a!pagingInfo(1,-1)), logicalExpression: a!queryLogicalExpression( operator: "AND", logicalexpressions: { a!queryLogicalExpression( operator: "AND", ignorefilterswithemptyvalues: true, filters: /*Status */ a!queryFilter( applyWhen: and(a!isNotNullOrEmpty(ri!statusFilterOperator), a!isNotNullOrEmpty(ri!statusFilterValue)), field: "c1", operator: ri!statusFilterOperator, value: ri!statusFilterValue ) ) }, ignorefilterswithemptyvalues: true ) ) ), refreshOnVarChange: local!refreshCounter), local!reportData: { startIndex: local!datasubset.startIndex, batchSize: local!datasubset.batchSize, sort: ri!pagingInfo.sort, totalCount: local!datasubset.totalCount, identifiers: local!datasubset.identifiers, data: a!forEach(local!datasubset.data,cast( typeof('type!{urn:com:appian:types:'()), fv!item) ), columnConfigs: local!datasubset.columnConfigs }, {a!buttonArrayLayout( align: "END", buttons: { a!buttonWidget( label: "", tooltip: "Refresh", size: "SMALL", color: "ACCENT", icon: "refresh", style: "GHOST", saveInto:{ a!save(local!refreshCounter,local!refreshCounter + 1) } ) } ), a!gridField( pagingSaveInto: a!save(local!refreshCounter,local!refreshCounter + 1), borderStyle: "STANDARD", initialSorts: a!sortInfo(field: "c1",ascending: true), label: "Process Tasks", emptyGridMessage: "No Active Process", labelPosition: "COLLAPSED", data: local!reportData.data, columns: { } )
Discussion posts and replies are publicly visible
It looks like the a!refreshVariable is set up correctly, but a!queryProcessAnalytics has always had weird behaviors so it doesn't surprise me if it's not working as expected. What happens if you update the saveInto on your button to do a!save(local!datasubset, a!queryProcessAnalytics(...))?
Dan Lluhi : I just tried with test process report. Please check below image
Interface:
Expression: