Grid refresh not working on Load()

HI All, 

  please anyone help me with refreshing the grid data depending on the Dropdown selection, below is my code snippet,

load(
local!AllValuesMaster: rule!LMP_getAllValuesMasterFilters(
typeid: ri!typeValueSelected,
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: - 1,
sort: a!sortInfo(
field: "abbreviation",
ascending: true()
)
)
),
local!type: cast('type!{urn:com:appian:types:LMP}LMP_REF_TYPES?list',
rule!LMP_getTypesListByFilters(
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: - 1,
sort: a!sortInfo(
field: "abbreviation",
ascending: true()
)
)
)
),



a!formLayout(
label: "Administration",
contents: {

a!sectionLayout(
contents: {
a!dropdownField(
label: "Master Data",
labelPosition: "ABOVE",
placeholderLabel: "--- Select a Value ---",
choiceLabels: {
"Type",
local!type.description
},
choiceValues: {
0,
local!type.typeid
},
value: ri!typeValueSelected,
saveInto:ri!typeValueSelected ,

validations: {}
),
a!boxLayout(
label: if(or(isnull(ri!typeValueSelected),ri!typeValueSelected = 0),
"Type",
rule!LMP_getTypesListByFilters(
typeid: ri!typeValueSelected
).description),
showWhen: ri!showhen,
contents: {
a!gridLayout(
label: "",
headerCells: {
a!gridLayoutHeaderCell(
label: "TypeId"
),
a!gridLayoutHeaderCell(
label: "Abbreviation"
),
a!gridLayoutHeaderCell(
label: "Description"
),
a!gridLayoutHeaderCell(
label: "Active"
),
a!gridLayoutHeaderCell(
label: ""
),
a!gridLayoutHeaderCell(
label: ""
)

},
columnConfigs: {
a!gridLayoutColumnConfig(
width: "ICON"
),
a!gridLayoutColumnConfig(),
a!gridLayoutColumnConfig(),
a!gridLayoutColumnConfig(
width: "ICON"
),
a!gridLayoutColumnConfig(
width: "ICON"
),
a!gridLayoutColumnConfig(
width: "ICON"
)
},
rows: a!forEach(
items: local!AllValuesMaster,
expression: a!gridRowLayout(
contents: {
a!textField(
value: fv!item.typeid,
saveInto: fv!item.typeid
),
a!textField(
value: fv!item.abbreviation,
saveInto: fv!item.abbreviation
),
a!textField(
value: fv!item.description,
saveinto: fv!item.description
),
a!checkboxField(
label: "gbe-active",
choiceLabels: {
""
},
choiceValues: {
true()
},
value: if(
or(
isnull(
fv!item.activein
),
not(
fv!item.activein
)
),
null,
toboolean(
fv!item.activein
)
),
saveInto: {
a!save(
fv!item.activein,
if(
isnull(
save!value
),
false(),
save!value
)
)

},
align: "CENTER"
),
a!imageField(
label: "delete " & fv!index,
images: a!documentImage(
document: a!iconIndicator(
"MOVE_UP"
),
altText: "Up",
caption: "Move Up ",
link: a!dynamicLink(
value: fv!index,
saveInto: {
if(
fv!index = 1,
{},
{
a!save(
local!AllValuesMaster,
insert(
local!AllValuesMaster,
fv!item,
fv!index - 1
)
),
a!save(
local!AllValuesMaster,
remove(
local!AllValuesMaster,
fv!index + 1
)
)
}
)
}
)
),
size: "ICON"
),
a!imageField(
label: "delete " & fv!index,
images: a!documentImage(
document: a!iconIndicator(
"MOVE_DOWN"
),
altText: "Down",
caption: "Move Down ",
link: a!dynamicLink(
value: fv!index,
saveInto: {
if(
fv!index = count(
local!AllValuesMaster
),
{},
{
a!save(
local!AllValuesMaster,
insert(
local!AllValuesMaster,
fv!item,
fv!index + 2
)
),
a!save(
local!AllValuesMaster,
remove(
local!AllValuesMaster,
fv!index
)
)
}
)
}
)
),
size: "ICON"
)
}
)
),
addRowLink: a!dynamicLink(
label: "Add " & if(or(isnull(ri!typeValueSelected),ri!typeValueSelected = 0),
"Type",
rule!LMP_getTypesListByFilters(
typeid: ri!typeValueSelected
).description),
saveInto: a!save(
local!type,
append(
local!type,
'type!{urn:com:appian:types:LMP}LMP_REF_TYPES'(
activein: true()
)
)
)
),
shadeAlternateRows: true,
paginginfo: a!pagingInfo(
startIndex: 1,
batchSize: -1,
sort: a!sortInfo(
field: "abbreviation",
ascending: true()
)
)
)

}



),


}
)

},
buttons: a!buttonLayout(
primaryButtons: {
a!buttonWidget(
label: "Submit",
submit: true,
style: "PRIMARY"
)
},
secondaryButtons: {
a!buttonWidget(
label: "Cancel",
value: true,
saveInto: ri!cancel,
submit: true,
style: "NORMAL",
validate: false
)
}
)

)
)

Thanks in advance

 Discussion posts and replies are publicly visible