Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a simple calculation to compare two columns and populate a new column with the lower value but I am getting null output...any ideas?



code block

def re_score(f1,f2,out1):
 if f1<f2:
  out1 = f1
 return out1

WARNING 000405: No records within table Succeeded at Tue Mar 06 15:13:45 2012 (Elapsed Time: 7.00 seconds)

share|improve this question
up vote 2 down vote accepted

You can evaluate your expression using a simple inline-if statement (does not require codeblock):

!Signal_Strength! if !Signal_Strength! < !Signal_Strength_1! else !Signal_Strength_1!

Or rework your codeblock:

def re_score(f1,f2):
    if f1 < f2:
        out1 = f1
        out1 = f2
    return out1

with expression:

re_score(!Signal_Strength!, !Signal_Strength_1!)
share|improve this answer was a dataset issue where the model was not updating itself properly. I added out1 in "strange"/extra places for error trapping - I could search for 99. – GeorgeC Mar 6 '12 at 6:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.