Questions tagged [if-else]

An if-else statement is a programming conditional statement that runs a different set of statements depending on whether an expression is true or false.

3 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
1answer
151 views

Why does Python if/else statement only return else condition when trying to reclassify field using ArcMap field calculator?

Using ArcGIS 10.4. I'm trying to reclassify values from a field (ECOREGION_DIVISION), which is in string format, into new values using the following Python syntax: def Reclass(ECOREGION_DIVISION): ...
1
vote
0answers
109 views

Reclassifying string variable in ArcGIS Field Calculator with Python Parser?

I am trying to calculate a roadway pedestrian restriction based on its functional class, using if/else logic in Python. Every time I enter this, it only turns up 'No'. The categories are strings, and ...
1
vote
0answers
132 views

Using IF-Statements in Calculate Field Code Block inside an Iteration

I have created a model in ArcGIS 10.2 that iterates through some feature classes in order to add a field 'Zmin10' (double) and calculate the field value based on a variable (called "Minimum") to which ...