Could not display interface. Please check definition and inputs.

Hello,

I'm trying to implement a 'Check box' functionality, with only one choice label and one value, when I do that it throws me the following error

"Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!checkboxField [line 427]: A checkbox component [label=“”] has an invalid value for “value”. All selected values must be present in the choiceValues array, but value was 1 and choiceValues was 1."

Also please let me know what data type to assign for (1) Check box (2) Radio Buttons (3) Drop Down

  Discussion posts and replies are publicly visible

Parents
  • Hi nellorea,

    I think you declared rule input as text but your choice values as an integer.
    Please check whether your choiceValue is text or not.

    Please try this code once

    a!checkboxField(
    label: "Checkboxes",
    labelPosition: "ABOVE",
    choiceLabels: {"Option 1"},
    choiceValues: {"1"},
    value: ri!a,
    saveInto: ri!a,
    validations: {}
    )
    -> Choice Labels and Choice Values must be the same length.
    -> And, Coming to data type as hemanthn said "The datatype is based on what value you are saving, whether its a integer or text or boolean, based on that selection you can define the datatype"

    Regards,
    Aswini
Reply
  • Hi nellorea,

    I think you declared rule input as text but your choice values as an integer.
    Please check whether your choiceValue is text or not.

    Please try this code once

    a!checkboxField(
    label: "Checkboxes",
    labelPosition: "ABOVE",
    choiceLabels: {"Option 1"},
    choiceValues: {"1"},
    value: ri!a,
    saveInto: ri!a,
    validations: {}
    )
    -> Choice Labels and Choice Values must be the same length.
    -> And, Coming to data type as hemanthn said "The datatype is based on what value you are saving, whether its a integer or text or boolean, based on that selection you can define the datatype"

    Regards,
    Aswini
Children
No Data