AnsweredAssumed Answered

Select by many attributes and then zoom to selected

Question asked by michaelides on Apr 27, 2018
Latest reply on May 22, 2018 by rvburton

simple model builderMore complex modelGUI

 

Hello. I need the help of the community and if possible the help of an ESRI’s staff.

After days and days of searching and reading different posts in the net and many dead ends (broken links) in ESRI’s site, I couldn’t find a solution to my problem.

My problem is that I’m trying to give a tool to some colleagues (ArcMap 10.5), that don’t have any experience with GIS software, which would help them to zoom to a selected parcel by selecting a value from various drop-down lists and not writing the SQL query themselves.

The tool which I’m trying to build in Model Builder (coding is not my strong background), will take the following variables: District, Town/Village, Quarter, Block, Sheet, Plan, and Parcel Number. Combining all those variables make the parcel selection unique.

Those Variables are different columns within a single Feature Class called “Parcels”.

In my model I used a tool that I had from an old search (now is a broken link) called “ChooseFieldValueToolbox10.tbx”. This tool let me expose as a list, the values from a field. Then I found the code (that actually works) from another post in the community (https://community.esri.com/thread/8396 - thanks Paul Lang), to zoom to selected feature.

Through my many failed attempts I decided to make the model (for testing purposes) with only one variable and not use all the aforementioned variables, just to see if it works, which it does (screenshot 1). For example the user to select a District or to select a Town as different models each time.

The problem is when I want to make combination of all those parameters. I can’t force the model to select from current selection and then zoom to final selection.

I attached a screenshot (screenshot 2) of my model, with the use of the first two variables (District and Town/Village).

When I run the tool, at the interface (screenshot 3), the second selection (Value (2)) does not populate the values based on the first selection (Value), instead it shows all the values of the field (Field(2)), and then nothing runs as it supposed to do. For example if in the second “Select by attributes” tool (screenshot 2), I have as a “Selection Type = SUBSET_SELECTION”, nothing gets selected so the zoom doesn’t work. If in the second “Select by attributes” tool (screenshot 2), I have as a “Selection Type = ADD_TO_SELECTION”, it selects all the rows that have the same “Dist_code” and doesn’t take account the Town/Village.

Sorry for the long post but I tried to make my problem as clear as possible.

Any ideas?

Outcomes