I have a Nearby app used for Planning and Land Use. The intent is to identify all of the Land Use regulations within a certain distance of a chosen area (in this case, a Parcel). Due to the nature of the app selecting every feature within the chosen radius, I have opted to remove Parcels from the results pane to improve performance. However, I still want the details on the specific parcel that I clicked.
During normal use, the first result in the results pane is a polygon that represents the entire Borough. Using an arcade expression that utilizes $userinput, I am able to grab the details I want from the single Parcel feature that sits where I clicked on the map, and add that information to the singular pop-up for the Borough. This is key, because it actually takes the user's click location into account (for example, an intersect would simply attempt to grab everything that the Borough polygon overlaps). In this case, the expression shown below returns the account number of the Parcel. This account number is then appended to the end of the Associated Permits link, to take the user to the Permitting page for that specific parcel. Since these are the general regulations of the local government, the intent is that this is always the first thing the user should see after inputting their location, which is why the polygon covers the entire Borough.
This workflow is much preferred to the alternative, where potentially hundreds of irrelevant parcels will attempt to load any time the user clicks on the map (there are a lot of layers in this map and it's slow enough as it is). And in the Map Viewer, it works great! However, when I try to utilize this function in the Nearby app, clicking on the Borough polygon only ever returns the value of the Parcel that sits within the centroid of the Borough, even though the pin still is dropped on the click location. This seems to completely defeat the purpose of $userinput! Is there a way to make this work?