How to use this formula in field calcultor in ArcMap. for example: A = Field1 B = Field2
if A =<B C = B else: C = A
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
@Vince is right and this could be solved using the
max(!A!, !B!) expression. However, if you had a more complex situation you could use a custom function. In Arcmap you can write a function on the code block space and then call it where you usually write the expression.
Your function (code block) could look something like:
my_function(field1_value, field2_value): if field1_value <= field2_value: return field2_value else: return field1_value
Then you can call it using the following expression:
Of course, you need to specify Python as the parser.