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
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.
Hi tiagosantos ,The error here describing that the value you are selecting must be from choice values, this occurs when the initial value for the displayValue is not null.You can try with 2 methods:
1. Use Property Function :
property(Your_Variable,null())
2. Use a!isNotNullOrEmpty (Preferred) :
if(a!isNotNullOrEmpty(Your_Variable),Your_Variable,null())
Please check the variable you are using to initialize the dropdown component has a valid value that is present in the choiceValues array. If the variable can be null, you may need to handle this case separately, such as by setting a default value or displaying a placeholder option.
Check the variable which is storing the value for this dropdown after this operation. Looks like its storing blank value (""). May be the issue lies within the saveinto configuration you have done for the code. can you share the dropdown code if possible.
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 componentsaveInto: RecordTypeA.relationship.recordTypeB.estado
value: RecordTypeA.relationship.recordTypeB.estado
New component ( This way it worked)saveInto: recordTypeB.estado
value: recordTypeB.estado
Thank you!!
Thank you!
Glad you found it!