@ShitijMehta , @SMehta , @XanderBakker
I want to create a tool either from Python or in ModelBuilder, but I am stuck at the last part.
I have a feature class and a lookup table. Field names aliases in feature class are the same as!ARCHETYPE! Value in a Lookup table.
Stand-alone table name: Tbl_HData
**Feature class name: FC_HData
Step 1:
I want the user to select Year and Archetype fields as a selection criterion from the stand-alone table. e.g. !Year! = 2030 And !Archetype! = "Small Multiplex built >= 2007" or !Year! = 2020 And !Archetype! = "Large Multiplex built < 2007".
Step 2:
Select records from fields in the Feature class that matches "!Small Multiplex built >= 2007!" And "!Large Multiplex built < 2007!" (Field aliases) and value > "0", and locate rows with the !Year! 2030 and 2020.
Step 3:
Use values from the field !Total_Change_Elec_NatGasEmissions_Tonnes! in the stand-alone table to Multiply with field values selected in step 2 (in FC) Also if selection from step 02 has more than one fields selected then calculation be like :
!Total_Change_Elec_NatGasEmissions_Tonnes! {##Field to update in FC_HData} =
(!Total_Change_Elec_NatGasEmissions_Tonnes!{##Field in Tbl_HData} *
!Small Multiplex built >= 2007! +!Large Multiplex built < 2007! {##Field in FC_HData}
There are about 5 or 6 fields that I have to update like this in FC_HData with this logic. However, if anyone has a better logic to address this problem, please let me know.
Test Data can be downloaded here. Let me if anyone got issues accessing the data.
I posted this question on GIS Stack but didn't get any response for 2 days so I am trying my luck here.
Looking forward to finding a solution.
Thanks in advance.
Hussain