I've been trying to implement a checkbox field but keep receiving an error. I can select either choice. I can select nothing. But if I select both choices, I get the following error:
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!checkboxField [line 638]: A checkbox component [label=""] has an invalid value for "value". All selected values must be present in the choiceValues array, but value was Fatality; Serious Injury and choiceValues was Fatality; Serious Injury.
For reference, this is the code I am using:
What am I doing wrong?
Discussion posts and replies are publicly visible
Hi Marco Tacca
The issue is because you are trying to save multiple values in a single field. If you want to select multiple values the value must be a type of array.
a!localVariables( local!data:{}, a!checkboxField( label:"Skills", choiceLabels: {"C","C++",".net","java","appian"}, choiceValues: {"C","C++",".net","java","appian"}, value: local!data, saveInto: local!data ) )