I am trying to use Select Layer By Location (Data Management) tool with specified "WITHIN_A_DISTANCE" to select one (Input) point layer based on a (Selecting Features) polygon layer. Both layers have a common field "COUNTY" and I want to ensure that the selection is done only in the same county and not across the counties regardless of meeting the specified distance requirement.
Currently, I know I can set the processing extent to each separate county by using additional county boundary layer and then merge those results to form statewide layer. But, I am wondering if there is a better way to accomplish this using loops in ArcPy. Is there a way to set the condition based on the same "COUNTY" attribute and select the points based on spatial relationship?