Populating one field based on the entry in another field
Hi,
I know this has been asked before and I’ve used those responses to get to this point but I’m still getting a syntax error. I have a list of physicians in a pull-down list. When a user selects one of them, I need their NPI and license number to populate the next two corresponding fields (“NPI” and “License,” respectively). I am attaching this on the “Validate” tab for the “Physician” field referenced above and I have the options set to “Commit selected value immediately.” The error when I try to save the script is “SyntaxError: syntax error 12: at line 13.” This is the script I’m using (values changed to generic ones):
var NPI = this.getField("NPI");
var License= this.getField("License");
if(event.value == "Dr. A"){
NPI.value = "123456";
License.value = "Alicense";}
else if(event.value == "Dr. B"){
NPI.value = "654321";
License.value = "Blicense";}
else if(event.value=== "Dr. C")
NPI.value = "7891011";
License.value = "Clicense";}
else{
NPI.value = "";
License.value = "";}
Thanks for the assistance in advance!
