Monday, 27 July 2015

Using Python if/then/else to return value from either of two fields based on value of third using ArcGIS Field Calculator?


I'm trying to avoid manually inputting Begin and End engineering station values already inputted into a seperate field.


I'm dealing with(4) fields:




  • Begin_Sta

  • End_Sta

  • Beg_End and

  • Station.


The Begin_Sta and End_Sta fields have engineering stations. The Beg_End field has either "BEGIN" or "END" inputted. The Station field is the one I want to populate using python in the field calculator.


If Beg_End has "BEGIN" then the engineering station value in the Begin_Sta field is returned into the Station field, else the End_Sta value is used to populate the Station field.


Is this possible using python in the Field Calculator?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...