AnsweredAssumed Answered

make all of the data in fields uppercase

Question asked by alnesbit on May 21, 2015
Latest reply on May 27, 2015 by tpcolson
>>> import arcpy
... fc = r'O:\path here...\Storm.gdb\Storm\JunctionBox'
... 
... desc = arcpy.Describe(fc)
... fields = desc.fields
... 
... for field in fields:
...      if field.Type == "String":
...          with arcpy.da.UpdateCursor(fc, str(field.name)) as cursor:
...              for row in cursor:
...                  if row[0] == None:  # Check for "<Null>"
...                      continue
...                  else:
...                      any(x.islower() for x in row[0]) == True
...                      row[0] = row[0].upper()
...                      cursor.updateRow(row)

Hello all,

 

I have this code that I pieced together in the past with your help. But it references a specific feature class on my network. How can I get it to now reference my sql express geodatabase feature class instead? The feature class is in my mxd where I run this, so can I just reference the feature class within this current map document somehow?

 

Thank you in advance,

Andrea

Outcomes