a!localVariables( local!singleDropDownValue, local!multipleDropDownValue, { a!dropdownField( label: "Single Dropdown", placeholder: "Select", choiceLabels: { "Jane", "Jack" }, choiceValues: { 1, 2 }, value: local!singleDropDownValue, saveInto: { local!singleDropDownValue }, validations: "Error..." ), a!multipleDropdownField( label: "Multiple Dropdown", placeholder: "Select", labelPosition: "ABOVE", choiceLabels: { "Jane", "Jack" }, choiceValues: { 1, 2 }, value: local!multipleDropDownValue, saveInto: { local!multipleDropDownValue }, validations: "Error..." ), a!buttonLayout( primaryButtons: a!buttonWidget(label: "submit", submit: true) ) } )
Expecting validation to trigger only when the field value is not null. It works for multiple dropdown, but why not for dropdown?
Discussion posts and replies are publicly visible
Why there isn't any condition for the validation property and instead it just has a text?
Required validations are triggered when you submit the form whereas the validation added via 'validations' property of a field triggers instantly.
but it is triggering instantly (without any save action) for dropdown field only not for multiple dropdown, what it can be ?
Just for testing hardcoded the text in validations. The behaviour is same with condition too.
My question is why both the field doesn't work similar? Dropdown shows the validation whereas multiple dropdown doesn't show.
Could be because one supports single selection and the other supports multiple. Did you try the same behavior with text and pickers, allowing multiple selections?
Also, is this behaviour causing any errors or issues in the app?
in the documentation both field says : , could be a bug ? as value is null
I don't think its because of single or multiple selection. Because text field also works as expected like multiple dropdown. Trying to understand behaviour of dropdown since it doesn't work as per the description provided by Appian.
Might be an issue. You can raise a support ticket for this and meanwhile, add another condition in validation that if the value is not null and your usual condition.
Ok thank you!
Edit: i misunderstood sorry, I can reproduce this behavior on Single Dropdown - i agree it seems like an error.