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

Apologies if this has already being asked but I couldn't find a page pointing to this problem.

enter image description here

I'm struggling with the python syntax in the Calculate Field so that, in the table above:

if b, c, d, or e are NOT NULL populate the Summary field with "Verified" else populate Summary field with "In Progress"

So if any of the B, C, D or E columns contain NULL the Summary field will read "In Progress".

I believe this should be something along the lines of:

def Reclass !SUMMARY!: if [ !B! , !C! , !D! , !E!] <> NULL !SUMMARY! = "Verified: " else !SUMMARY! = "In Progress: "

Any help is greatly appreciated :-)

share|improve this question
up vote 8 down vote accepted

Run the field calc on the Summary field. Use Python as the parser and check the Show Codeblock box.

For the Pre-Logic Script Code put:

def Reclass(B, C, D, E):
    if None not in (B, C, D, E) and "" not in (B, C, D, E):
        return "Verified"
        return "In Progess"

Then put this in the bottom box:

Reclass(!B!, !C!, !D!, !E!)

The bottom box with the ! contains the actual field names that get passed into the Reclass function in the top box.

I included the "" not in (B, C, D, E) as a check specifically for text fields that are blank but don't have the Null value, if you need it.

share|improve this answer
Thanks Ian. That worked a treat... – spk578 Aug 8 '14 at 8:52
@Simon Good to hear! – ianbroad Aug 8 '14 at 8:53

This answer is not meant to steal from @ian, but it shows a little bit easier way to write the code that he provided... instead of using a code block (which can be a pain in the butt sometimes when trying to write it in a standalone script...) you can rewrite his code in a single line as:

"Verified" if None not in (!B!, !C!, !D!, !E!) and "" not in (!B!, !C!, !D!, !E!) else "In Progress"
share|improve this answer

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.