Find by Attributes and Location analysis tool

452
2
07-27-2023 12:37 PM
Labels (1)
rscottsemmens
New Contributor

I am using the new map viewer analysis tool Find by Attributes and Location. I am trying to create two sets of attribute conditions. In each set there are two attribute queries with a total of two sets. Within each set there is an "and" operation and between each set there is an "or" operation. This was easily done in the Map viewer classic version. I don't follow the logic with the new map viewer version. Does anybody understand how the new analysis tool works for these types of queries? I know i can do this via filter but I should be able to do these kinds of queries with this tool. 

0 Kudos
2 Replies
RobinDiSalvo1
Occasional Contributor

This might help it'a link on how to perform an analysis using the Tools in MapViewer.  Here's a link

0 Kudos
AmandaRing
Esri Contributor

Hi @rscottsemmens,

Glad to hear you are using the new tool. We are still working on improvements, so your feedback is highly valued and will be taken into consideration.

Similar to in the Filter UI, the trick for switching from AND to OR is switching the dropdown under "Where" from "All of the following are true" to "One of the following are true".

AmandaRing_0-1694481225719.png


These statements apply to any expression at the same level of indentation.

So in the following example, we will find patches of grass where either the scientific name includes 'Lachnanthes' OR the year of the observation is 2022 OR it is within 2 km of a campground:

AmandaRing_3-1694482584718.png

 



In order to have nested query groups, you can use an Expression group.
Let's say we wanted to update our example to find patches of grass where either the scientific name includes 'Lachnanthes' OR  [both the year of the observation is 2022 AND it is within 2 km of a campground].
In that case, after the first expression, we would add an Expression group within which the second and third expressions would be listed, with their own WHERE operator.

AmandaRing_4-1694482619884.png


This reads as patches of grass where either the scientific name includes 'Lachnanthes' OR  where all of the following are true: the year of the observation is 2022 AND it is within 2 km of a campground.

 

QueryBuilderSections.png



In terms of creating two expression groups which would each have an "or" operation, there unfortunately isn't currently a good way to do this with the tool. However, we are working on a fix so that this type of grouping should be possible with the next update of ArcGIS Online this fall. 

We appreciate your patience. Please let us know if you have any other questions or concerns about the tool!

Cheers,

Amanda
Product Engineer - Web Analysis
0 Kudos