I have a script that runs when the form user exits a dropdown object after making a selection. I do not want the script to run if the dropdown object is left blank (user does not make a selection). I need to create an if statement to test if the user made a selection from the dropdown. All the items in the dropdown are 4 digit numbers. I would prefer the if statement is in the Exit event. Is the following script correct?
if(dropdown1.isNull || dropdown1.rawValue.length !=4){
xfa.host.messageBox("You need to make a selection, dropdown name");
}
else{
put script to run here
}