I have a grid and many rows. For each row there is 1 check box where when I click on check box value should go to localvariable and when I unselect the check box that particular value should be removed.
a!checkboxField( label: "", choiceLayout: "COMPACT", choiceLabels:"yes", choiceValues: 1, value: if( fv!item.value = 0, null, fv!item.value ), required: false(), saveInto: { fv!item.value , a!save( fv!item.isJointUtilized_int, if( fv!item.value = 1, a!save( local!checkbox, append( local!checkbox, fv!item.othervalue ) ), a!save( local!checkbox, rdrop( local!checkbox, 1 ) ) ) }, ),
Here value is getting appended into local!variable but while removing its removing last value in array. Not the one which is unselected. Can anyone help
Discussion posts and replies are publicly visible
hi,i would recommend a mixture between a kind of cdt/map logic for your grid values and if the checkbox value is true (boolean type)then your local variable should be updated automatically by a index(....,wherecontains(true,...),{}) . The automatic local update is done by a refreshvariable logic.