AnsweredAssumed Answered

Setting Field Visibility

Question asked by johnmdye on Apr 24, 2014
Latest reply on Apr 24, 2014 by johnmdye
Anyone know how to make fields in a Feature Layer visible or hidden?

Tried using the Field Info object, no luck there...
desc = arcpy.Describe("FeatureLayer") field_info = desc.fieldInfo visibleFields = ["ID", "NAME", "Rank", "Count"] for index in xrange(0, field_info.count):     fieldName = str(field_info.getfieldname(index))     if fieldName in visibleFields:         print "Found Field " + str(fieldName) + " in visibleFields. Setting Visible..."         field_info.setvisible(index, "VISIBLE")     else:         print "Field " + str(fieldName) + " not found in visibleFields. Setting Hidden..."         field_info.setvisible(index, "HIDDEN")

Tried tossing a RefreshActiveView() onto the end, that didn't help either.