Hi Everyone,
I am trying to achieve multi selection checkbox but its not working as expected
a!checkboxField( label: "", choiceLabels: cons!CR_TXT_CHOICE_LABELS_YES_NO[1], choiceValues: cons!CR_APP_INT_CHOICE_VALUES[1], value: if( contains( cons!CR_APP_INT_CHOICE_VALUES[1], tointeger(local!selectionFlag_int) ), tointeger(local!selectionFlag_int), null() ), saveInto: local!selectionFlag_int, align: "LEFT" ),
Thanks in Advance.
Discussion posts and replies are publicly visible
It seems like, In the choice labels and choice values you are indexing the first value of the constant. Pass the constant without any indexing and remove the if condition logic in the value parameter and pass local!selectionFlag directly.
a!localVariables( local!selectionFlag_int, a!checkboxField( label: "", choiceLabels: {"Yes","No","Maybe"}, choiceValues: {1,2,3}, value: local!selectionFlag_int, saveInto: local!selectionFlag_int, align: "LEFT" ), )
ChoiceLabel:"Yes",ChoiceValue: 1
No I do not want Any Choice Label here and there should be one Choice value.
Can you elaborate your requirement?
Are you looking for a single check box without any label
Okay, I need a checkbox that user can select single or multiple checkbox at a time ,There is no checkbox label.
multi select checkbox.
Then you can just remove the choice label and pass list of empty text in choice labels. Note that number of empty text in choice label must match number of choice values
a!localVariables( local!selectionFlag_int, a!checkboxField( label: "", choiceLabels: {"","",""}, choiceValues: {1,2,3}, value: local!selectionFlag_int, saveInto: local!selectionFlag_int, align: "LEFT" ) )
According to above code ,If I select one checkbox it is selected for all the rows by default, This should not happen like this User has to select checkbox
May i know why you attached a checkbox field code in the question?
Are you using an editable grid?
If it is a readonly grid, I suggest you to use the selection parameter which comes as part of the grid. Please pass selectable as true and use the following parameters.
selectable: true, selectionValue: local!selection, selectionSaveInto:
yeah It is ReadOnly grid But I need to provide one option to user to select multiple rows and on select of multiple rows need to enable multidrop down.