All selected values must be present in the choiceValues array

Hi. I have a dropdown list. It fails when I select one of the values. Here is the code:

a!localVariables(
  local!formAnswer: {
    function: "",
    subFunction: ""
  },
  local!dynameiceValue: {
    functionList: rule!JRA_QRY_getBusinessOwnerFunctionList_AbbVie(),
    subFunction: rule!JRA_QRY_getbusinessOwnerSubFunctionList_AbbVie(
        businessOwnerFunction: local!formAnswer["function"]
    ),
  },
  {
    a!dropdownField(
      label: "function",
      value:  local!formAnswer["function"],
      placeholder: "select",
      choiceLabels: local!dynameiceValue["functionList"],
      choiceValues: local!dynameiceValue["functionList"],
      saveInto: a!save(local!formAnswer["function"], tostring(save!value))
    )
  }
)

I get the options by query rule and put it into a variable. It looks like good. But it will throw the error when I select the value.

This is the error message:

Interface Definition: Expression evaluation error at function a!dropdownField [line 23]: A dropdown component [label="function"] has an invalid value for "value". All selected values must be present in the choiceValues array, but value was Affiliate and choiceValues was Affiliate; Allergan Aesthetics (AA) Commercial; Commercial; Corporate; Research & Development.

The value "Affiliate" is in the choiceValues. So I do not understand why it fails

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer

    rows: {
    a!forEach(
    items: ri!educationDetails,
    expression: a!gridRowLayout(
    contents: {
    a!dropdownField(
    choiceLabels: {local!courseType.displayLabel},
    choiceValues: {local!courseType.lookupId},
    value: ri!educationDetails.courseType

    ),
    a!textField(
    value: ri!educationDetails.specification,
    saveInto: ri!educationDetails.specification
    ),
    a!textField(
    value: ri!educationDetails.specification,
    saveInto: ri!educationDetails.specification
    ),
    a!dateField(
    value: ri!educationDetails.graduatedYear,
    saveInto: ri!educationDetails.graduatedYear
    ),
    a!floatingPointField(
    value: ri!educationDetails.passPercentage,
    saveInto: ri!educationDetails.passPercentage
    )
    }
    )
    )
    },
    addRowLink: a!dynamicLink(
    label: "Add Education Details",
    saveInto: ri!educationDetails,
    value: append(ri!educationDetails,a!map())
    )

    I face the same problem , can someone help me here

Reply
  • 0
    Certified Associate Developer

    rows: {
    a!forEach(
    items: ri!educationDetails,
    expression: a!gridRowLayout(
    contents: {
    a!dropdownField(
    choiceLabels: {local!courseType.displayLabel},
    choiceValues: {local!courseType.lookupId},
    value: ri!educationDetails.courseType

    ),
    a!textField(
    value: ri!educationDetails.specification,
    saveInto: ri!educationDetails.specification
    ),
    a!textField(
    value: ri!educationDetails.specification,
    saveInto: ri!educationDetails.specification
    ),
    a!dateField(
    value: ri!educationDetails.graduatedYear,
    saveInto: ri!educationDetails.graduatedYear
    ),
    a!floatingPointField(
    value: ri!educationDetails.passPercentage,
    saveInto: ri!educationDetails.passPercentage
    )
    }
    )
    )
    },
    addRowLink: a!dynamicLink(
    label: "Add Education Details",
    saveInto: ri!educationDetails,
    value: append(ri!educationDetails,a!map())
    )

    I face the same problem , can someone help me here

Children
No Data