Solved! Go to Solution.
import arcpy from arcpy import env env.overwriteOutput = 1 env.workspace = r"C:\temp\python\test.gdb" firstTime = True for fc in arcpy.ListFeatureClasses("*"): if firstTime: arcpy.Frequency_analysis(fc, "Report", "created_user;last_edited_user") arcpy.AddField_management("Report", "FC_Name", "TEXT", "", "", 200) with arcpy.da.UpdateCursor("Report", ["FC_NAME"]) as cursor: for row in cursor: row[0] = str(fc) cursor.updateRow(row) del row, cursor firstTime = False else: arcpy.Frequency_analysis(fc, r"IN_MEMORY\Report", "created_user;last_edited_user") arcpy.AddField_management(r"IN_MEMORY\Report", "FC_Name", "TEXT", "", "", 200) with arcpy.da.UpdateCursor(r"IN_MEMORY\Report", ["FC_NAME"]) as cursor: for row in cursor: row[0] = str(fc) cursor.updateRow(row) arcpy.Append_management(r"IN_MEMORY\Report", "Report", "TEST") del row, cursor
import arcpy from arcpy import env env.overwriteOutput = 1 env.workspace = r"C:\temp\python\test.gdb" firstTime = True for fc in arcpy.ListFeatureClasses("*"): if firstTime: arcpy.Frequency_analysis(fc, "Report", "created_user;last_edited_user") arcpy.AddField_management("Report", "FC_Name", "TEXT", "", "", 200) with arcpy.da.UpdateCursor("Report", ["FC_NAME"]) as cursor: for row in cursor: row[0] = str(fc) cursor.updateRow(row) del row, cursor firstTime = False else: arcpy.Frequency_analysis(fc, r"IN_MEMORY\Report", "created_user;last_edited_user") arcpy.AddField_management(r"IN_MEMORY\Report", "FC_Name", "TEXT", "", "", 200) with arcpy.da.UpdateCursor(r"IN_MEMORY\Report", ["FC_NAME"]) as cursor: for row in cursor: row[0] = str(fc) cursor.updateRow(row) arcpy.Append_management(r"IN_MEMORY\Report", "Report", "TEST") del row, cursor