I have an interface that gets data via an integration and then filters those results:
local!caseCommentsResult: rule!UWM_Get_Case_Comments(caseId: ri!caseId), local!caseComments: local!caseCommentsResult.result.body, local!filteredActivities: a!forEach( items: local!caseComments, expression: if( tostring(fv!item.commentType) = "CASE_NOTE", fv!item, null ) ),
And it is displayed in a grid:
a!columnLayout( contents: { a!localVariables( local!pageSize: 25, { a!gridField_23r3( emptyGridMessage: "No comments available", data: local!filteredNonNullActivities,
local!editCompleted : false, local!isCommentUpdated: a!refreshVariable( value: local!editCompleted, refreshOnReferencedVarChange: local!editCompleted ), local!isCommentAdded: a!refreshVariable( value: true, refreshAfter: "RECORD_ACTION" ), local!isRefreshNeeded: if( or( local!isCommentUpdated, local!isCommentAdded ), true, false ), local!caseCommentsResult: a!refreshVariable( value: rule!UWM_Get_Case_Comments(caseId: ri!caseId), refreshOnReferencedVarChange: local!isRefreshNeeded ),
Discussion posts and replies are publicly visible
I worry that you're overcomplicating this. What happens if you simply declare local!caseCommentsResult to use the "refreshAfter: "RECORD_ACTION"" parameter?