Hello,
I am trying to create a python IF/THEN statement within a model that runs the field calculator tool. Essentially I want it to check to make sure if a cell has data entered (IS NOT NULL), and if so, calculate a concatenation of 4 other fields.
Sample of what I want:
IF field1 <> NULL
THEN field2 = concatenation expression
ELSE field1 still = NULL
My python skills are very rudimentary, and I have only tested off of what I've found through googling python IF/THEN statements. I don't fully understand how to take their samples and make them work with what I need to accomplish. One of the samples that I've tried to mimic is pasted below:
Expression:<BR />Reclass(!WELL_YIELD!)<BR /><BR />Expression Type:<BR />PYTHON_9.3<BR /><BR />Code Block:<BR />def Reclass(WellYield):<BR /> if (WellYield >= 0 and WellYield <= 10):<BR /> return 1<BR /> elif (WellYield > 10 and WellYield <= 20):<BR /> return 2<BR /> elif (WellYield > 20 and WellYield <= 30):<BR /> return 3<BR /> elif (WellYield > 30):<BR /> return 4