custom check box issue

Certified Associate Developer

hi, 

I have a custom check box written for my grid as i have nested loop , i a unable to implement the appian default selection check boxes. 

here is the code, 

a!richTextIcon(
icon: "square-o",
link: a!dynamicLink(
saveInto: {
a!save({local!selectedIndex},fv!index),

a!save(local!selectedProcedure, append(local!selectedProcedure,fv!item))
}
),
linkStyle: "STANDALONE",
showWhen: tointeger(local!selectedIndex) <> fv!index,
color: "SECONDARY",
size: "MEDIUM"
),
a!richTextIcon(
icon: "check-square-o-alt",
link: a!dynamicLink(
saveInto: {
a!save(local!selectedIndex,null),
a!save(local!selectedProcedure, difference(local!selectedProcedure,fv!item)),
}
linkStyle: "STANDALONE",
showWhen: tointeger(local!selectedIndex) = fv!index,
color:"SECONDARY",
size: "MEDIUM"
),

This code actually , appends the index in the local!selectionprocedure  but when i unselect it , it actually removes the last item in the local!selectedProcedure but not the actual index unselected. Any leads will help. 

  Discussion posts and replies are publicly visible

Parents
  • Why are you using difference instead of remove for removing the selected item?

    Having reviewed your code, it is adding the element to local!selectedProcedure when it is selected in the first structure, but you are using it in the second one... Perhaps the array local!selectedProcedure is not being handled correctly

    Could you share here the full code  here please?

Reply
  • Why are you using difference instead of remove for removing the selected item?

    Having reviewed your code, it is adding the element to local!selectedProcedure when it is selected in the first structure, but you are using it in the second one... Perhaps the array local!selectedProcedure is not being handled correctly

    Could you share here the full code  here please?

Children
No Data