I have the following code snippet from an interface expression that is not updating the refresh variables. I have confirmed that local!refresh updates on record action as it is supposed to, but I cannot get local!selected_tasks or local!expired_tasks. I have tried multiple different configurations of the refresh parameters inside a!refreshVariable() as you can see from all the commented out portions, but none of them seem to work.
I removed all of the record type references in the code, but I assure you they are there in my actual expression.
Any insight would be greatly appreciated.
local!refresh: a!refreshVariable( value: rand(), refreshAfter: "RECORD_ACTION" ), local!selected_process_ids: if( a!isNotNullOrEmpty(ri!clientSignOffProcess), ri!clientSignOffProcess[], null() ), local!selected_workflow: ri!clientSignOffProcess[], local!selected_tasks: a!refreshVariable( value: a!queryRecordType( recordType: , fields: { }, filters: { a!queryFilter( field: , operator: "=", value: ri!clientSignOffProcess[] ), a!queryFilter( field: , operator: "=", value: cons!WSP_WORKFLOW_STATUS_WAITING_ON_CLIENT_SIGNOFF_ID ) }, pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 50) ).data, refreshOnVarChange: local!refresh, /*refreshAfter: "RECORD_ACTION",*/ /*refreshAlways: true()*/ ), local!expired_tasks: a!refreshVariable( value: a!forEach( items: local!selected_tasks, expression: if( rule!WSP_UTIL_checkIfPacketIsExpiredByWorkflowId( fv!item[] ), fv!item[], 0 ) ), /*refreshAfter: "RECORD_ACTION",*/ refreshAlways: true(), /*refreshOnVarChange: local!refresh*/ ),
Discussion posts and replies are publicly visible
I'm pretty unclear what your chain of events is here, but you'll still need to make sure that all DB writes (in the record action process itself as well as any launched Start Process events from that form) are chained through before returning to the original interface.