I have a single select dropdown field called "How did you hear about AIES? I have a default option that is "Choose from the dropdown". What would the script be that will validate that this field does not have "please choose from the dropdown" selected in this field?
Generally, I'd recommend you just remove that "choose from the dropdown" option, remove your default value and set that field as required. This will let the built-in logic take care of ensuring a field is selected.
But if you really insist on using a script runner script, you can do it with something like this:
def field = getFieldById(getFieldChanged())
field.clearError()
if(field.value == 'Choose from the dropdown'){
field.setError('Please choose from the dropdown')
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.