Problem with Dropdown component

Hello people!

I have a problem with the dropdown component. My component is initially initialized with the value of a null variable, but when I change it to a valid value according to the range, it works normally, but when I click on the selection option (placeholder), I get the following error

Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error in rule 'interface' at function a!dropdownField [line 1098]: A dropdown component [label="Estado"] has an invalid value for "value". All selected values must be present in the choiceValues array, but value was and choiceValues was AC; AL; AM; AP; BA; CE; DF; ES; GO; MA; MG; MS; MT; PA; PB; PE; PI; PR; RJ; RN; RO; RR; RS; SC; SE; SP; TO.

The variable has a null value and the component is understanding it as an invalid value.

Can anyone help me?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    This error occurs when the value you selected is not part of the list. The value must be null, an empty string could trigger this error.

    Any code could be helpful.

  • I figured out what happened. I was passing in the value and in the saveinto a relationship of a record type, but for some reason when the variable was changed it was giving an error. What I did was create a new component that received only the record I needed to use, in this case, only the record of the relationship. This way it worked.



    Exemple:

    Old component

    saveInto: RecordTypeA.relationship.recordTypeB.estado

    value: RecordTypeA.relationship.recordTypeB.estado

    New component ( This way it worked)

    saveInto: recordTypeB.estado

    value: recordTypeB.estado

Reply
  • I figured out what happened. I was passing in the value and in the saveinto a relationship of a record type, but for some reason when the variable was changed it was giving an error. What I did was create a new component that received only the record I needed to use, in this case, only the record of the relationship. This way it worked.



    Exemple:

    Old component

    saveInto: RecordTypeA.relationship.recordTypeB.estado

    value: RecordTypeA.relationship.recordTypeB.estado

    New component ( This way it worked)

    saveInto: recordTypeB.estado

    value: recordTypeB.estado

Children