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
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?
Hi kowsalyavijayan Do you have anything inside fv!item that can be used as an identifier? if so you can try this:
Change this
a!save(local!selectedProcedure, difference(local!selectedProcedure,fv!item)),
to this
a!save(local!selectedProcedure, remove(local!selectedProcedure,wherecontains(fv!item.id,local!selectedProcedure.id)),
Here I am assuming that the unique element that can be used is called "id"
Let me know if that helps!
awesome , awesome, thanks for helping .it worked
if , i select the check box , and edit the row the updated value for a row is not getting updated in the local!selectedProcedures. but selecting after editing saves the value. is there a work around for this one ?