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,

    Seems like the choiceValues and Value are not same. Can you please check if you have double quotes in either the choiceValues or the Value, since that will make one value a integer and other a text, which will throw the error.

    The value for the checkbox should be within the list in the ChoiceValues list, if not it will throw an error. the below syntax will fail, because of the double quotes for value : "1", if you remove the quotes it should work.

    =a!checkboxField(
    label: "Test",
    instructions: "Test for Error",
    choiceLabels: {
    "Test"
    },
    choiceValues: {
    1
    },
    value: {"1"}
    )


    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.

    Thanks
Reply
  • Hi,

    Seems like the choiceValues and Value are not same. Can you please check if you have double quotes in either the choiceValues or the Value, since that will make one value a integer and other a text, which will throw the error.

    The value for the checkbox should be within the list in the ChoiceValues list, if not it will throw an error. the below syntax will fail, because of the double quotes for value : "1", if you remove the quotes it should work.

    =a!checkboxField(
    label: "Test",
    instructions: "Test for Error",
    choiceLabels: {
    "Test"
    },
    choiceValues: {
    1
    },
    value: {"1"}
    )


    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.

    Thanks
Children
No Data