I'm trying to make tool of change detection between two polygons layers by fields of initial state and final state. Everything is working except attribute selection, I would like user could choose whether areals with no change include or exclude from calculations. I create new layer by intersection, then I want to compare values in field of initial state with values in field of final state and exclude areals without change.
# select areals without no change if change == "Exclude": where_clause = '"' + field_initial + '" <> ' + "'" + field_final + "'" arcpy.Select_analysis(output_fc, output_select2, where_clause)
output_fc is layer created by intersection.
It creates new layer, but with all objects, it makes no selection at all, I would like to get same result as when I use attribute selection in ArcMAP. I tried to do it in python window, also in tool, there is no error in expression but no selection.