Select to view content in your preferred language

Attribute Assistant IIF statement error

2362
1
10-15-2013 06:21 AM
Labels (1)
LarryPhillips
Emerging Contributor
This one has me stumped.  What do I need to do to get this to work?

My goal is to populate a value from an intersecting polygon.  The value will come from one of two polygons and the choice is made based on the value in the "TOWNCODE" field.

Row Info
        Row Number 1
        TableName: SAWS_Addresses
        FieldName: MCYCLE
        ValueInfo: BNDRY_Meter_Routes|CYCLE
        ValueMethod: INTERSECTING_FEATURE
        On Create: 0
        On Change: 0

      Checking for Subtype Restriction
      Field Name: MCYCLE was found at index: 29
                  Trying: INTERSECTING_FEATURE
                  Starting to process rule
                  Value Info is: BNDRY_Meter_Routes|CYCLE
                  Layer Found: Meter Routes
                  CYCLE: at 1
                  Searching on feature Class
                  Cursor created
                  Starring Loop of found features
                  Checking Class
                  Different FCs
                  Setting Value: 09
                  Value Set
                  Finished: INTERSECTING_FEATURE
    ------------------------------------------------
    ------------------------------------------------
      Row Info
        Row Number 2
        TableName: SAWS_Addresses
        FieldName: TPROD
        ValueInfo: DSP_Meter_Routes|CYCLE
        ValueMethod: INTERSECTING_FEATURE
        On Create: 0
        On Change: 0

      Checking for Subtype Restriction
      Field Name: TPROD was found at index: 68
                  Trying: INTERSECTING_FEATURE
                  Starting to process rule
                  Value Info is: DSP_Meter_Routes|CYCLE
                  Layer Found: DSP Meter Routes
                  CYCLE: at 2
                  Searching on feature Class
                  Cursor created
                  Starring Loop of found features
                  Checking Class
                  Different FCs
                  Setting Value: 02
                  Value Set
                  Finished: INTERSECTING_FEATURE
    ------------------------------------------------
    ------------------------------------------------
      Row Info
        Row Number 3
        TableName: SAWS_Addresses
        FieldName: MCYCLE
        ValueInfo: IIF([TOWNCODE]="Q",[TPROD],IIF([TOWNCODE]="U",[TPROD],IIF([TOWNCODE]="Z",[TPROD],IIF([MCYCLE] IS NULL,"NA",[MCYCLE]))))
        ValueMethod: EXPRESSION
        On Create: 0
        On Change: 0

      Checking for Subtype Restriction
      Field Name: MCYCLE was found at index: 29
                  Trying: EXPRESSION
                  replace field: MCYCLE with a value
                  replace field: MCYCLE with a value
                  replace field: TOWNCODE with a value
                  replace field: TOWNCODE with a value
                  replace field: TOWNCODE with a value
                  replace field: TPROD with a value
                  replace field: TPROD with a value
                  replace field: TPROD with a value
                  Checking to verify there is a field to store the expression
                  ERROR: evaluating the expression for feature in SAWS Addresses with OID of 532962
                         Object required
                  Finished: EXPRESSION

I'm working with the slightly older Infrastructure Editing Template from 6-29-2012.
0 Kudos
1 Reply
MikeMillerGIS
Esri Frequent Contributor
Larry,
   Thanks for posting the log file, it really helps!  It looks like the expression is correct, but I think I recall an issue with IS NULL, can you try the following?

IIF([TOWNCODE]="Q",[TPROD],IIF([TOWNCODE]="U",[TPROD],IIF([TOWNCODE]="Z",[TPROD],IIF(isNull([MCYCLE]) ,"NA",[MCYCLE]))))
0 Kudos