Hi All,
Hope everyone is doing well,
I have a requirement, where we are using task reports for assigning tasks in application UI. I need to implement the auto refresh the tasks assigned to the logged in users.
Can you please help me understand what the logic would be I need to use. Please find the attached code snippet I have used currently.
a!gridField_23r3( emptyGridMessage: "No Assigned Tasks", /*label: "Read-only Grid",*/ /*labelPosition: "ABOVE",*/ data: a!queryProcessAnalytics( report: cons!CTRIS_MY_TASK_REPORT, query: a!query( logicalExpression:{ a!queryLogicalExpression( operator: "AND", filters:{ a!queryFilter( field: "c12", operator: "in", value: cons!CTRIS_PROCESS_MODEL_IDS_FOR_TASK_FILTER ), a!queryFilter( field: "c0", operator: "includes", value: local!searchTask, applyWhen:a!isNotNullOrEmpty(local!searchTask) ) } ) }, pagingInfo: fv!pagingInfo ), ), columns: { a!gridColumn( label: "Task Name", sortField: "c0", value: a!linkField( links: a!processTaskLink( label: fv!row.c0, task: fv!identifier ) ) ), a!gridColumn( label: "Created On", sortField: "c2", value: if( isnull(fv!row.c2), fv!row.c2, datetext(fv!row.c2, "default") ), showWhen: false(), align: "END" ), a!gridColumn( label: "Process Name", sortField: "c13", value: fv!row.c13, showWhen: false() ), a!gridColumn( label: "Process Model Id", sortField: "c12", value: fv!row.c12, showWhen: false(), align: "END" ), a!gridColumn( label: "C 3", sortField: "c3", value: fv!row.c3, showWhen: false() ), a!gridColumn( label: "Status", sortField: "c5", value: fv!row.c5, showWhen: false(), align: "END" ), a!gridColumn( label: "C 7", sortField: "c7", value: fv!row.c7, showWhen: false() ), a!gridColumn( label: "C 8", sortField: "c8", value: if( isnull(fv!row.c8), fv!row.c8, datetext(fv!row.c8, "default") ), showWhen: false(), align: "END" ), a!gridColumn( label: "C 9", sortField: "c9", value: fv!row.c9, showWhen: false(), align: "END" ) }, pageSize: 5, initialSorts: { a!sortInfo( field: "c2" ) }, validations: {}, refreshInterval: 0.5 )
Discussion posts and replies are publicly visible
You’re already following best practice by using refreshInterval (30 seconds) in refreshVariable for auto-refresh. For even better UX, you can add a refreshAlways: true, property to refresh instantly on any user action, and include a manual “Refresh” button for immediate updates. True real-time updates aren’t possible as 30 seconds is the minimum interval allowed. Your current approach is optimal.
sivakrishnam0002 said:the auto refresh
What exactly do you mean with this?
Hi Stefan Helzle, whenever a package is created set of tasks will be created as assigned to the logged in users in our application. These assigned tasks should be reflected in the home page after the task is saved and released. But the default refresh variable value for page is 30 secs. Can we make this page to refresh immediately.
No, you can't.
But, keep in mind that the user does not wait for a task to appear, because he does not expect that task. If that task appears after 30 seconds, this should be perfectly fine.
You just have to make you testers aware, that they should not wait for the task, even if they know it should appear. But this is only because they act in more than one role.
Stefan Helzle Shubham Aware (shubhama926776) Thanks for your suggestions