Ok its work now ..... but suppose that i have 10 layers in the TOC in MXD and i want to run that python script not all the layers i want to run that script on just 5 layers only what should i do to prevent the script from running on the other 5 layers specially if they don't have that field Parcel_ id and i do not want to face that error message ,can i put the layers that i want in a group and run just the script only on them ,how can i do that ?or there are another solution ? Also i noticed that script run on all layers even if they do not have 7 in parcel_id field and hide all the features inside this layer that do not have value 7.
More details i want to run the script on layers aa & bb & cc and they have field parcel_id and value 7 ... but i do not want to run the script on layer fire 1992 that layer has field parcel_id but do not have value 7 or any other values, the script in that case run in all layers even fire1992 and disappear all features inside that layer.
what i want:
1- I want that python script to run on the specific layers only.
2- And other layers that do not have DQ on them, I do not want that error message that you mentioned before if that possible . because logically some specific layers has parcel _ id field and I want to run the script on them and other layers do not have that field and I do not want to run the script on them .