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
Doesn’t inherently cascade refreshes each dependent variable must declare what triggers it. So link refreshOnVarChange at each layer, ensuring refresh propagation across local!refresh -> local!selected_tasks -> local!expired_tasks.
local!refresh: a!refreshVariable( value: rand(), refreshAfter: "RECORD_ACTION" ), local!selected_tasks: a!refreshVariable( value: a!queryRecordType(...).data, refreshOnVarChange: local!refresh ), local!expired_tasks: a!refreshVariable( value: a!forEach(...), refreshOnVarChange: local!selected_tasks )
This doesn't work. I attempted the fix you suggested. I also attempted the following fix to see if I could simply get it to work.
local!refresh: a!refreshVariable( value: rand(), refreshAfter: "RECORD_ACTION" ), local!selected_tasks: a!refreshVariable( value: a!queryRecordType(...).data, refreshOnVarChange: local!refresh ), local!expired_tasks: a!refreshVariable( value: a!forEach(...), refreshOnVarChange: local!refresh )
This might sound odd, but do you have a record action for that page (the entire interface)? I can refresh the local refresh variable using your logic.
I'm not sure I understand the question. I have record actions being called in a gridField, which is properly updating the local!refresh variable. But the cascading variables are not updating.
When the record action completes, are you staying on the same interface, or does it navigate away/close a dialog?
The record action is opened in a dialog.