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
I'd expect it would also work if you set "refreshAlways" to true for the refreshVariable used in the rule.
Mike Schmitt said:I'd expect it would also work if you set "refreshAlways" to true for the refreshVariable used in the rule.
That does in fact work within the rule - confirmed. So we can bypass sending the reload counter input at least, but, still have to configure the child rule's a!localVariables to refresh themselves, in any situation where you are trying to refresh parent data from that rule.
yeah, that's about the size of it. to recap, afaik there are 4 mutually exclusive options/routes here:
In reality we'll need to decide between options 1, 3, or 4 depending on our use case (using 1 or not will automatically be determined by whether you need to use local variables in the first place). There are pros and cons to both 3 and 4 - and it'll always (afaik) depend on the use case; neither way is "right" or "wrong".
Hi Peter,
Thank you so much!! It worked...