Local Variable (Query Rule) not get refresh on refreshVariable

Certified Lead Developer

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

Parents
  • 0
    Certified Senior Developer

    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
    )

Reply
  • 0
    Certified Senior Developer

    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
    )

Children