Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Python in Field Calculator

$
0
0
Hello,

i try to use the index position of a field for an if-clause in the field calculator.

gesamt =
Code:

function(arcpy.fieldInfo.findFieldByName(!gesamt!))
Codeblock:
Code:

def function(index):
 if (index > 30):
  ergebnis =  (!Join_Count! + !Join_Count_1!)
  return ergebnis
 else:
  return 99

Result:
Attachment 31051

This way or syntax is probably totaly wrong and i am grateful for any advise or solution.

Thank you
Attached Thumbnails
Click image for larger version

Name:	result.JPG‎
Views:	N/A
Size:	23.6 KB
ID:	31051  

Viewing all articles
Browse latest Browse all 2485

Trending Articles