Get Text from Two Fields to Show in Third Field
I have three fields: CALicense, ARLicense, and AgentLicense.
I would like AgentLicence to show text from either/both CA and AR License fields depending on which is entered. I’m getting lost on the if condition part of the script – I’m thinking that a check for empty fields is necessary…? Here's the direction I'm thinking of:
var lic1 = this.getField(“CALicense”).value;
var lic2 = this.getField(“ARLicense”).value;
if (lic1 = “” && lic2 = “”){
event.value = “”;
}
if (CALicense has text but not ARLicense){
event.value = “CA License #” + lic1;
}
If (RALicense has text but not CALicense){
event.value = “ARLicense #) + lic2;
}
If (both CALicense and ARLicense both have text)}
event.value = “CA License #” + lic1 + “ & ARLicense #” + lic2;
}
