I am trying to find a specific field name in layers in a current working MXD, but I'm having problems getting it right. The overall goal is to loop through layers in an MXD and set a definition query based on a user input (string type). The script runs without any errors, but no definition query is set. Could it be because the type returned… Show more
Darren, Thanks for the help. I am currently running this Pythron script (v. 2.7.8) as a Script tool in a toolbox in ArcMap (v. 10.3.1). When I test the code in the Python Window in ArcMap, I am able to list the fields in the (for f in fields:) loop. But, at the end of the prints, I am getting this error. Any ideas as to why?