All,
In arc pro I am developing a script to check for duplicates in a field for several layers. I have gotten the check to run in the loop with no issues. After the find identical tool runs i want to use a if then statement to check if the out put is blank and if it is not join the tables. How do i do this? It is failing at line 17. My code is
F=("feature1","feature2","feature3","feature14")
b =0
for e in F:
a=F[b]
s=str(a).replace(" ", "_")
o= "C:\\path\\way\\ArcGIS\\Projects\\edit_map6\\edit_map6.gdb\\" +s+"_findidencal"
arcpy.management.FindIdentical(
in_dataset= a,
out_dataset=o,
fields="FACILITYID",
xy_tolerance=None,
z_tolerance=0,
output_record_option="ONLY_DUPLICATES"
)
if o is not empty:
arcpy.management.AddJoin(
in_layer_or_view=a,
in_field="OBJECTID",
join_table=o,
join_field="IN_FID",
join_type="KEEP_ALL",
index_join_fields="NO_INDEX_JOIN_FIELDS",
rebuild_index="NO_REBUILD_INDEX",
join_operation="JOIN_ONE_TO_FIRST"
)
#print result
b=b+1
Laura