About a month ago, I was tasked with a project to find points in a polygon area. I could never quite crack it, in part, because by polygon layer wasn't actually a layer, it was a table, but I kept getting close. Ultimately, we converted the table to an actual polygon layer and used the Zone Lookup Instant App. It did everything we needed and was super easy to set up. Then, the new ArcGIS Online update came out and the update to Feature Info didn't quite work the way anyone expected and I wondered if could use the Near Me tricks I was working on to make a popup replacement. Again, I couldn't quite get there. I felt I was so close to something useful, but I every iteration lead to some weird response. I wound up with some versions that would work on mouse click and others that would work with a Search Widget, but never both at the same time. In some versions, clicking a polygon would select a neighboring polygon. I was getting a bit obsessive and going slightly crazy.
I think I finally cracked it. I found the idea that is mostly useful. I built a Zone Lookup App using only OOTB Experience Builder widgets. Did you know one Near Me Widget can trigger another? This is a build based on double-hidden Near Me Widgets. This is a build that can find points in a polygon using either a Locator Source or a Layer Source, or by clicking on the map. Downsides: If you want to use both a Locator and Layer Source, you will need to separate Search Widgets and clicking directly on the point layer will not trigger the Near Me functions.
For my demo, I have a map with a polygon layer of counties and a point layer of Bigfoot sightings. Let's find some big feet! (Maybe don't Google that.)
Step One: Big Feet Near Me (Really Don't Google That.)
Let's add a Map Widget and connect it to our Bigfoot map. I'm going to turn off popups. I think it will be better that way. Then, I throw in a Near Me Widget and rename it Bigfeet Near Me. In my Near Me settings, I will set the Search Distance to 0. I go to Add Analysis and select my Bigfoot layer and set the Analysis Type to Proximity. (To all the confused people who just typed the first four letters of analysis and big feet into their search engines, this isn't the site you are looking for.) Now, go back to the Map Widget Settings Action Tab. Add a Record Selection Changes>Framework>Select Data Records Action and set both the Trigger and Action Data to the Counties layer. Then, Add Action and Bigfeet Near Me>Set Location. This should find all of the Bigfeet in a county by mouse click.
![JeffreyThompson2_0-1720026160846.png JeffreyThompson2_0-1720026160846.png](https://community.esri.com/t5/image/serverpage/image-id/108720i7136259F324072CF/image-size/medium?v=v2&px=400)
![JeffreyThompson2_1-1720026396287.png JeffreyThompson2_1-1720026396287.png](https://community.esri.com/t5/image/serverpage/image-id/108723i54CF02F9341B5C72/image-size/medium?v=v2&px=400)
Step Two (Optional): Search By Layer Source
Add a Search Widget. Add New Search Source and select the Counties layer. It would be good design to change the Hint to something that clarifies that the user should enter a county name. Turn off Enable Filtering For Layer Source Search. I've also renamed my Search Widget to County Search. In the Action Tab, add a Record Selection Changes>Map>Zoom To Action and then a Bigfeet Near Me>Set Location Action. Zoom To should be before Near Me, apparently this order matters. Now, searching for counties should find Bigfeet.
![JeffreyThompson2_3-1720027217265.png JeffreyThompson2_3-1720027217265.png](https://community.esri.com/t5/image/serverpage/image-id/108725i7C5AC68CA8A479D7/image-size/medium?v=v2&px=400)
![JeffreyThompson2_2-1720027193553.png JeffreyThompson2_2-1720027193553.png](https://community.esri.com/t5/image/serverpage/image-id/108724i6826BFF02523B1D7/image-size/medium?v=v2&px=400)
Step Three: Search By Locator Source
This is where it gets a little weird. We are going to double up Near Me. (Google people, go away, this still isn't what you want. (Seinfeld voice: Not that there's anything wrong with that.)) Add a second Near Me Widget. We'll call this one Counties Near Me. As before, set the Search Distance to 0. This time set the Analysis Type to Closest Feature. You will also want to turn off Highlight Results On Map. In the Action Tab, add a Record Selection Changes>Bigfeet Near Me>Set Location Action.
![JeffreyThompson2_4-1720028379943.png JeffreyThompson2_4-1720028379943.png](https://community.esri.com/t5/image/serverpage/image-id/108728iEEC39D14BFF920A5/image-size/medium?v=v2&px=400)
Now add a second Search Widget, set your search to a Locator Source. In the Action Tab, make Record Selection Changes>Map>Zoom To and Counties Near Me>Set Location Actions. Now using the Locator Search will find a location, send it to the Counties Near Me Widget, find the correct county and pass the county on to the Bigfeet Near Me Widget.
Step Four: Build An Output
Depending on how your user searches and in what order, the Counties Near Me Widget may fall out of sync with the currently searched for Bigfeet. So you will definitely want to hide it. And I still ain't a fan of how Near Me looks so I'll hide both of them. To make my output, I will use the newly updated capabilities of the Feature Info Widget. To get my Bigfeet, I will go to the Outputs Tab>Bigfeet Near Me>BigFoot (Proximity) Output View.
![JeffreyThompson2_1-1720031188042.png JeffreyThompson2_1-1720031188042.png](https://community.esri.com/t5/image/serverpage/image-id/108751iC16B35E3FDA4B2FB/image-size/medium?v=v2&px=400)
For the Counties, I will add the Counties layer from my map in the Added Data Tab. Then, I will click back on the Counties layer in the Settings Panel to get more options and use the dropdown menu to pick Selected Features.
![JeffreyThompson2_2-1720031311387.png JeffreyThompson2_2-1720031311387.png](https://community.esri.com/t5/image/serverpage/image-id/108754iB1467DDFA3F5EA97/image-size/medium?v=v2&px=400)
![JeffreyThompson2_3-1720031404502.png JeffreyThompson2_3-1720031404502.png](https://community.esri.com/t5/image/serverpage/image-id/108755i9CFAD01EB0118C23/image-size/medium?v=v2&px=400)
Go find big feet near you from the safety of Experience Builder.
![JeffreyThompson2_0-1720031028316.png JeffreyThompson2_0-1720031028316.png](https://community.esri.com/t5/image/serverpage/image-id/108747i89E589371C0DB0CD/image-size/medium?v=v2&px=400)