1 vote
588 views

### Python script for if/elif condition in field calculator [duplicate]

I need some help in calculating the last column (OD_pairs.Ai_) based on the condition; if travel_cost has a value below 10, OD-pairs.Ai_ takes the value of the first column(Aij_OjFCij..) if ...
• 35
20 views

### Calculating Field from text to integer using ArcMap [duplicate]

I'm using ArcGIS 10.7 trying to calculate a speed field (for my data of roads in California) really simply such that roads = 45 and highways = 65. I know I need to use an if then statement but I'm not ...
32k views

### VBScript - If/Then Statement - Field Calculator

I am trying to do a simple (or so I thought) if/then statement in the ArcGIS field calculator. I am trying to add the HydroCode field - hydologic soil codes - to an existing data set. I know what the ...
6k views

### Field calculator if and elseif statement with <Null> values in ArcGis 10.1

Trying to figure out how to get this "Headwater" column to indicate "Yes" (or 1) if the value of "NextDown_Copy" is "" and "No" (or 0) if it has any other value (eg. 7100381010). I attempted to try ...
9k views

### Writing Python script in Field Calculator in ArcGIS Desktop?

I'm a programmer, I have programmed in C#, Java, but not with Python. And I'm not a geographic worker. How can I write a python script into Field Calculator to be able to check the other column value. ...
• 391
1 vote
199 views

### Creating new field in ArcGIS Desktop which contains values from two different columns with certain conditions?

Suppose I have a attribute table as shown in the image below: I have columns A and B with common FID. I would like to add a new column C, which contains the values of column A with the condition that ...
• 15
1 vote
172 views

### Generate a string based on an integer range

After some initial research, I was unable to find a solution for the following issue. I'm sure there's an answer to this question already floating around here somewhere, but hopefully someone can give ...
• 527
1 vote
208 views

### Creating If Then statement in Field Calculator between 2 values? [closed]

I have a FC with a column for NEAR_ANGLE from the output of the NEAR tool. The angle is displayed in degrees (i.e. -154.67687) which is fine. I am trying to create a column, HEADING, that reads this ...
174 views

### VBA/Python If/then statements in Field Calculator for one column based on another not working

I know this question has been asked a hundred times on here, for example: Basic If/Then in Python Parser of ArcGIS Field Calculator? Using if/elif/else statements in ArcGIS Field Calculator? Checking ...
1 vote
92 views

### OpenStreetMap- Field Calculator to Merge/Flatten Layer Attributes?

I'm not sure exactly what I am asking, probably lending to my struggle to figure it out via google. I have a large polygon layer from OpenStreetMap data (openstreetmap.org). My problem is I need to ...
1 vote
128 views

### Using an IF statement in Field Calculator

I'm trying to use an if statement in the field calculator: This is what the code looks like in Python: a= 2 FacilityID= !FACILITYID! if a%2==0: MH_ID_Calc=FacilityID[0:6] else: MH_ID_Calc=...
• 11