Refresh readonly grid data on button click not working

Hi,

PFB my code snippet. when i click on button my data in the readonly grid is not refreshing. The source is a expression rule which calls an integration to get the data to display in grid. Kindly provide suggestions.

a!localVariables(
local!currentUser: rule!CORE_GetLoggedInUserName(),
local!refreshCounter: 0,
local!employees: a!refreshVariable(
value: rule!PM_GetCurrentAddresses(
tenantId: "77b50320-5f06-5740-84f4-18d4a8cda51d",
identifierId: local!currentUser,
serviceLocationId: "cac14c53-a058-4824-86dc-f24cea29b948"
),
refreshOnVarChange: local!refreshCounter
),
{
a!buttonArrayLayout(
buttons: {
a!buttonWidget(
label: "Refresh",
size: "SMALL",
style: "SECONDARY",
saveInto: a!save(local!refreshCounter, local!refreshCounter + 1)
)
}
),
a!gridField(
labelPosition: "COLLAPSED",
data: local!employees,
refreshOnVarChange: local!refreshCounter,
columns: {
a!gridColumn(
label: "Address Type",
value: fv!row.addressTypeDescription,
width: "MEDIUM"
),
a!gridColumn(
label: "Address Line 1",
value: fv!row.line1,
width: "MEDIUM"
),
a!gridColumn(
label: "City",
value: fv!row.city,
width: "MEDIUM"
),
a!gridColumn(
label: "State",
value: fv!row.stateDescription,
width: "MEDIUM"
),
a!gridColumn(
label: "Postal Code",
value: rule!CORE_FormatZipCode(fv!row.zip)
),
a!gridColumn(
label: "Effective Date",
value: rule!PM_FormatDate(fv!row.effectiveDate)
),
a!gridColumn(
label: "End Date",
value: rule!PM_FormatDate(fv!row.endDate)
)
}
)
}
)

  Discussion posts and replies are publicly visible

Top Replies