calculate field based on match/unmatch

238
0
07-11-2019 01:21 PM
ModernElectric
Occasional Contributor III

I am building a comparison analysis for a database outside of my GDB, but still use the data within the GDB. I have imported the data into a File GDB and have the following fields I am working with:

   ACLARA_TYPE

   ACLARA_MODEL

   METER_TYPE

   ANALYSIS_FLAG

Here is what I am doing:

   If ACLARA_TYPE = 39 and ACLARA_MODEL = 2 AND EQUALS METER_TYPE = CMT_GEN, then to populate the ANALYSIS_FLAG Field with 1. If it DOES NOT match, then the ANALYSIS_FLAG Field would be populated with 0. Basically, If the METER_TYPE Equals something different (Lets say CMT_1), there is something wrong with the data. The thing is, I am trying to find incorrect METER_TYPE(s) based on the TYPE and MODEL.

ACLARA_TYPE      ACLARA_MODEL   METER_TYPE   ANALYSIS_FLAG

     39                                    2                        CMT_GEN            1

      39                                    2                        CMT_1                  0

I Hope this makes sense on what I am trying to accomplish.

I am using the CALCULATE_FIELD Tool and will eventually build this process into a Python Script.

Thank You

0 Kudos
0 Replies