Select to view content in your preferred language

How to find a field in all FC inside a FGDB

387
2
Jump to solution
02-03-2026 10:56 AM
Labels (3)
SanchezNuñez
Frequent Contributor

Good afternoon,

 

Is there a way to identity all the feature classes that use a specific field in a FGDB?

 

0 Kudos
1 Solution

Accepted Solutions
RobertKrisher
Esri Regular Contributor

Using the Generate Schema Report tool to create an xlsx schema report gives you a table that lets you answer this question without needing to write any Python:

RobertKrisher_0-1770214142557.png

 

View solution in original post

2 Replies
AlfredBaldenweck
MVP Frequent Contributor

You have to go through them individually.

Something like (untested)

gdb = r"your path to gbd"
arcpy.env.workspace = gdb
fieldName = "Martians_Present"
usesFields = []

for fc in arcpy.ListFeatureClasses():
    fields = [f.name for f in arcpy.ListFields(fc)]
    if fieldName in fields:
        usesFields.append(fc)

print(usesFields)

 

RobertKrisher
Esri Regular Contributor

Using the Generate Schema Report tool to create an xlsx schema report gives you a table that lets you answer this question without needing to write any Python:

RobertKrisher_0-1770214142557.png