Having looked at a number of posts on this subject, I'm still miffed as to the logic of a nested IIF. Basically, I want an if, elseif statement that would look like this:
If condition 1:
do this...
Elseif condtion2:
do something else
Simple enough, right?!
Here is my actual situation: I capture the login of a user, and based on that login, aa needs to assign one of 4 initial strings. With one iff:
IIF([Operator] = "JBorgione","JVB,"") ### my login, changes to my initials, at this stage a different login would leave it ### blank
With a second iif, it fails:
IIF([Operator]="JBorgione","JVB",IIF([Operator] = "TCurtis","TMC")) ### if I don't login but TCurtis does....
Here's what the log file tells me:
ValueInfo: IIF([Operator]="JBorgione","JVB",IIF([Operator] = "TCurtis","TMC"))
.....
replace field: Operator with a value
Checking to verify there is a field to store the expression
Expression to be eval: IIF("JBorgione"="JBorgione","JVB",IIF("JBorgione" = "TCurtis","TMC"))
ERROR: evaluating the expression for feature in MasterStreetNameFC with OID of 26039
System.ArgumentException: Wrong number of arguments or invalid property assignment: 'IIF'
Obviously, I'm unsure of what I need to do to satisfy the requirements.
mmiller-esristaff
monzay (I think you used to be user monzay, disregard if not...)
stonejd
That should just about do it....