I don't understand the IIF(condtional) expression syntax and I'm hoping someone can explain it a little better than the example at Attribute Assistant methods - Attribute Assistant | ArcGIS Solutions .
The basic syntax goes IIF(expression, truepart, falsepart). In my simple mind, I read this as:
If the expression evaluates as true, return the truepart, and if it evaluates as false, return the falsepart.
I guess this isn't correct.
In my case, I am examining the field ROADTYPE to see if it is null. If it is null, I would like to populate the field FULLNAME with the concatenated values of fields ROADNAME and ROADPOSTDIR. If ROADTYPE is not null (which indicates it has a value), I want to populate the field FULLNAME with the concatenation of ROADNAME and the existing value of ROADTYPE. So in the Value_Info field of my DynamicTable, for the FULLNAME field I have:
IIF(isNull(ROADTYPE),[ROADNAME]&" "&[ROADPOSTDIR],[ROADNAME]&" "&[ROADTYPE]) but doesn't return anything...
Sometimes our streets are named, sometimes they are numeric. If they are named, they get a type, if they are numbered, they get a post directional:
JOES LN
versus
4104 S
Solved! Go to Solution.
Try this syntax:
IIF(isNull([ROADTYPE]),[ROADNAME]&" "&[ROADPOSTDIR],[ROADNAME]&" "&[ROADTYPE])
(added [] around the field name in the isNull() function)
Also - make sure that the Field Name field int he Dynamic Value Table points to the field where you want the results to be written.
no experience, but I did notice that field names seem to be enclosed in square brackets, except for this part
isNull(ROADTYPE) did you just try a simple case, assign "null" if true and "not null" if false or whatever the non-python syntax is
Try this syntax:
IIF(isNull([ROADTYPE]),[ROADNAME]&" "&[ROADPOSTDIR],[ROADNAME]&" "&[ROADTYPE])
(added [] around the field name in the isNull() function)
Also - make sure that the Field Name field int he Dynamic Value Table points to the field where you want the results to be written.
Thanks Dan and Allison; I'll check my brackets in the table; these tired eyes!
moments later- you guys are both correct. But since I don't do facial hair, I gave the correct answer to Allison... (Just kidding Dan...)