custom selection check box does not save updated variable

Certified Associate Developer

I have a grid  where i implemented custom check box, 

a!gridrowLayout {

contents:{

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

a!save(local!selectedrows, append(local!selectedrows,fv!item))


}
),
linkStyle: "STANDALONE",
showWhen:{if(and(local!editProcedures,tointeger(local!selectedIndex) <> fv!index),true,false)},
color: "SECONDARY",
size: "MEDIUM"
),
a!richTextIcon(
icon: "check-square-o-alt",
link: a!dynamicLink(
saveInto: {
a!save(local!selectedIndex,null),
a!save(local!selectedrow, remove(local!selectedrow,wherecontains(fv!item[ recordtype!fields.id],local!selectedProcedure[recordtype!.feilds.id))),

}
),

have drop downs and text fields below 

}

Now , if i edit the row and select teh check box, it saves the updated value from the row to local!selectedrow, but when i select the check box and then update the column fields, the updated value doesnot appear in the saved local!selectedrow .Please help

}

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

     hi  May I know your requirements and what you want to achieve? 

  • 0
    Certified Associate Developer
    in reply to Abhishek Karumuru

    hi have row like this ,   now after editing a column field and then select the check box, i can see the updated value being saved, 

    but , if i select teh check box first , and then edit a column field , i dont see them getting updated. , i have to uncheck and select again to make to see them being updated. my requirement is the value should get updated , not matter i select the row first and update or update the row and select the check box, fyi, this check box is customized as shown in the code is shared earlier

  • 0
    Certified Senior Developer
    in reply to kowsalyavijayan
    my requirement is the value should get updated , not matter i select the row first and update or update the row and select the check box

    What is the point of having the check box? 

    Do you have multiple rows of data in the grid? Are you trying to select a particular row and then you edit the selected row, click on something or somewhere and update your grid data?

    You will have to use an if condition for your checkbox to display a different icon based on the selection criteria and also the saves have to change on the conditional basis.  You need to save values to the selected row variable and update the gridData with the selected/updated row data.

    Also I would recommend share the complete code and also please explain your issue more clearly if possible. use the code box to paste your code. 

Reply
  • 0
    Certified Senior Developer
    in reply to kowsalyavijayan
    my requirement is the value should get updated , not matter i select the row first and update or update the row and select the check box

    What is the point of having the check box? 

    Do you have multiple rows of data in the grid? Are you trying to select a particular row and then you edit the selected row, click on something or somewhere and update your grid data?

    You will have to use an if condition for your checkbox to display a different icon based on the selection criteria and also the saves have to change on the conditional basis.  You need to save values to the selected row variable and update the gridData with the selected/updated row data.

    Also I would recommend share the complete code and also please explain your issue more clearly if possible. use the code box to paste your code. 

Children