Hello - I was just replying to a problem with jumping attribute tables and wanted to share my experiences. When describing the data, I was trying to count the number of fields (attributes) in a dataset, but can only see how this can be done manually or with code/sql/fme.
If there isn't already a place I can simply glance to get this information, I feel like this information is important to people doing GIS design work.
Solved! Go to Solution.
I know you mentioned not using scripting or coding but this quick Python bit worked well for me
In Pro in the Python module:
import arcpy
fields = arcpy.ListFields('Layer Name')
print(len(fields))
Aaron,
This may be still manual but a little less manual. You could go to the Fields view in Pro and look at all the fields there without it jumping around too much (I mean, I hope it doesn't jump in this view):
I know you mentioned not using scripting or coding but this quick Python bit worked well for me
In Pro in the Python module:
import arcpy
fields = arcpy.ListFields('Layer Name')
print(len(fields))
Haha maybe I should have said I was against dev'ing my own code 😉 this is awesome, thank you very much
Just be aware that len(arcpy.ListFields(dataset))
will return the count of all fields, including system-managed fields like OID, GlobalID, etc... It may be that you are interested in all fields, but it may be you are just interested in user-defined fields.
Adrian Welsh, you might want to update Line 02 to be
fields = arcpy.ListFields(dataset)
As written, Line 02 implies you pass a field name to the ListFields function, which isn't the case.
Whoa whoops! I totally meant dataset and NOT field name, haha. I changed my post to say Layer Name (since that is what my little python script was looking for).
Thanks for pointing that out!
And good point on how that will return all fields instead of just user-defined ones.
No worries. Was able to get it to work. Cheers