Hi,
Working on a new AR and it keeps telling me that it needs a Close Parenthesis. I've checked this thing over and over and don't see any missing. It is based on another script that works - hence my confusion. Says it is on the first 'else if' line.
Thanks!
var addrtype = $feature.AddrType
var addrsub = $feature.AddrSubCode
var addrstat = $feature.AddrStatus
var lsotype = $feature.LSOType
var unit = $feature.Unit
if (addrtype == 1) {
addrstat = 'A';
}
else if ((addrtype = 3) && (addrsub = 'PRESUB') && (!IsEmpty(unit))) {
addrstat = 'R';
}
else if ((addrtype = 3) && (addrsub = 'MODEL')) {
addrstat = 'R';
}
else if ((addrtype = 3) && ((addrsub != 'MODEL') or (addrsub != 'PRESUB'))) {
addrstat = 'A';
}
else if (addrtype = 2) {
addrstat = 'A';
}
else {
addrstat = addrstat;
}
return addrstat;