Hi,
we are trying to refresh local variable value on var change but it is not working. PFB Code
a!localVariables( local!refreshOnVarChange: false, local!allMessages: a!refreshVariable( value: rule!DS_QRY_getMessageThread( returnDatasubset: false, filters: a!queryFilter( field: "clientInboxId", operator: "in", value: {15,16} ) ), refreshOnVarChange: local!refreshOnVarChange /*refreshAlways: true, even in this case data is also not get refresh*/ ), local!textBox, a!sectionLayout( contents: { a!textField( value: local!textBox, saveInto: { local!textBox, a!save(local!refreshOnVarChange, not(local!refreshOnVarChange)) } ), a!textField( value: length(wherecontains(true,index(local!allMessages, "isRead", ""))), readOnly: true ) } ))
Discussion posts and replies are publicly visible
Can you try adding refreshOnReferencedVarChange: false in your refreshVariable and check?
local!allMessages: a!refreshVariable( value: rule!DS_QRY_getMessageThread( returnDatasubset: false, filters: a!queryFilter( field: "clientInboxId", operator: "in", value: { 15, 16 } ) ), refreshOnReferencedVarChange: false, refreshOnVarChange: local!refreshOnVarChange )
Yes but doesn't work
Is it possible you have a local variable defined inside of your rule DS_QRY_getMessageThread? If so, you likely also need to add a refresh variable within that rule and define refreshAlways: true.
Rahul said:try adding refreshOnReferencedVarChange: false
The enclosed code snippet isn't referencing any other variables, so this will actually make no difference.
Hi Peter,
Thank you so much!! It worked...