Dropdown error ,getting invalid value for value ,All selected values must be present in choiceValues array

Hi Appian Team,

We are getting the following error,

Interface Definition: Expression evaluation error in rule 'pf_sections' at function a!dropdownField_20r2 [line 84]: A dropdown component [label=“Shipper”] has an invalid value for “value”. All selected values must be present in the choiceValues array, but value was 4473 and choiceValues was .

We have integer or number tyepe in choicevalue as well as in the value field , both types are same can anyone help me out to clear this error?

Thanks

Sunu Sam

  Discussion posts and replies are publicly visible

Parents
  • Might be because you haven't configured the dropdown to have a placeholder:

    placeholder (Text): Text to display when nothing is selected and the value is null.

    ...if not,then you need to share the code so the community can diagnose with a bit more insight.

  • Hi Stewart,

    Please check the below dropdown code

    a!dropdownField(
    label: "Shipper",
    labelPosition: "ABOVE",
    helpToolTip: "Note: This is not the carrier",
    placeholderLabel: "--- Select a Value ---",
    choiceLabels: index(local!ShipperMapping, "Shipper", {}),
    choiceValues: index(local!ShipperMapping, "ShipperID", {}),
    value:ri!PF_Request.ShipperID,
    saveInto: {
    ri!PF_Request.ShipperID,
    a!save(ri!PF_Request.OtherShipper, null)
    },
    required: and(
    rule!GLB_isBlank(ri!PF_Request.ShipperID),
    and(
    or(
    or(
    ri!PF_Request.PO_SO_STO_INDEL_OUTDEL = "PO",
    ri!PF_Request.PO_SO_STO_INDEL_OUTDEL = "SO",
    ri!PF_Request.PO_SO_STO_INDEL_OUTDEL = "STO",
    ri!PF_Request.PO_SO_STO_INDEL_OUTDEL = "OD",
    ri!PF_Request.PO_SO_STO_INDEL_OUTDEL = "ID"
    ),
    ri!PF_Request.PO_SO_STO_INDEL_OUTDEL = "B"
    ),
    or(
    ri!PF_Request.ShipmentDirectionID = "1",
    ri!PF_Request.ShipmentDirectionID = "3"
    )
    )
    ),
    validations: {}
    ),

Reply
  • Hi Stewart,

    Please check the below dropdown code

    a!dropdownField(
    label: "Shipper",
    labelPosition: "ABOVE",
    helpToolTip: "Note: This is not the carrier",
    placeholderLabel: "--- Select a Value ---",
    choiceLabels: index(local!ShipperMapping, "Shipper", {}),
    choiceValues: index(local!ShipperMapping, "ShipperID", {}),
    value:ri!PF_Request.ShipperID,
    saveInto: {
    ri!PF_Request.ShipperID,
    a!save(ri!PF_Request.OtherShipper, null)
    },
    required: and(
    rule!GLB_isBlank(ri!PF_Request.ShipperID),
    and(
    or(
    or(
    ri!PF_Request.PO_SO_STO_INDEL_OUTDEL = "PO",
    ri!PF_Request.PO_SO_STO_INDEL_OUTDEL = "SO",
    ri!PF_Request.PO_SO_STO_INDEL_OUTDEL = "STO",
    ri!PF_Request.PO_SO_STO_INDEL_OUTDEL = "OD",
    ri!PF_Request.PO_SO_STO_INDEL_OUTDEL = "ID"
    ),
    ri!PF_Request.PO_SO_STO_INDEL_OUTDEL = "B"
    ),
    or(
    ri!PF_Request.ShipmentDirectionID = "1",
    ri!PF_Request.ShipmentDirectionID = "3"
    )
    )
    ),
    validations: {}
    ),

Children