Attribute Assistant - Create works, Manual does not

280
2
03-13-2014 09:33 AM
Labels (1)
BillTen_Broeck
New Contributor
I have an Expression method:
LTRIM(COALESCE([ADDRNUM], "") + " " + COALESCE([ROADPREDIR],"") + " " + COALESCE([ROADNAME],"") + " " + COALESCE([ROADTYPE],"")  + " " + COALESCE([UNIT],""))

It runs just fine on "create", although it does throw an error in the log:
Expression to be eval: LTRIM(COALESCE("4288", "") + " " + COALESCE("","") + " " + COALESCE("NEWBERRY","") + " " + COALESCE("RD","")  + " " + COALESCE("",""))
Type mismatch: 'COALESCE'
However, the destination field DOES contain the correct data.

However, the same expression:
LTRIM(COALESCE([ADDRNUM], "") + " " + COALESCE([ROADPREDIR],"") + " " + COALESCE([ROADNAME],"") + " " + COALESCE([ROADTYPE],"")  + " " + COALESCE([UNIT],"")) when run "manually" does NOT update the value when one of the fields (say ADDRNUM) is changed. It fails with the same error:
Expression to be eval: LTRIM(COALESCE("4270", "") + " " + COALESCE("","") + " " + COALESCE("NEWBERRY","") + " " + COALESCE("RD","")  + " " + COALESCE("",""))
ERROR: evaluating the expression for feature in Address Points with OID of 162532
Type mismatch: 'COALESCE'

These are from the same edit. I changed the ADDRNUM from 4288 to 4270, and that change was recognized in the second expression, but nothing was done to the destination field.

I hope this is understandable. Thanks.
0 Kudos
2 Replies
MikeMillerGIS
Esri Frequent Contributor
Bill,
  I have never tried the COALESCE function and not sure it is supported.  We are using the msscriptcontrol to evaluate the expression which is very limited.  Have you tried a simpler version of your statement make sure it works?  The "Expression" rule is the same, no matter how it is triggered.  Some rules have trigger event filters, but this one does not.
0 Kudos
BillTen_Broeck
New Contributor
I understand that the Coalesce function may not be "supported" per se, but isn't it odd that it works "On Create", but not on "Manual Only"? I was hoping maybe someone had some insight into that. I think I'll do some research into the msscriptcontrol to see if I can figure anything out.

Thanks for the feedback Mike.
0 Kudos