Use Arcade to Pull Field Attributes from a Polygon Layer into a Point Layer Pop-up

by | Mar 22, 2023

Dynamic labeling and visualization have become a lot easier with the release of Arcade.  Arcade can be used to assist with labeling, symbology rendering, field calculation, and pop-up content. The question used to be; how do you display data when there is no column in the schema containing that data? Up until the release of Arcade, we had to either create the attribute field and populate it with data, or we had to hire developers.

For the purposes of this tutorial, you are a County Treasurer, and you would like to search for a newly assigned address point and easily determine the assigned taxing districts you need to input into the system for that new location.

You will learn how to use Arcade to pull attribute data from a Hospital Taxing District polygon layer to populate the pop-up of an address point layer with its appropriate taxing district based on an intersect-relationship.

The first thing you will need to do is make sure you know the field names that contain the data you want to use from the Hospital District taxing layer. These need to be the actual field names and not the aliases. Select the layer in Map Viewer and then click to open the fields settings panel.

As you can see in the image above, the field names we want to use in our Arcade expression will be NAME and DISTCAT.

Next, make sure you have the address point layer selected from your layer list and then open the pop-ups settings for your layer. For the purposes of this demonstration, the address point layer is called “Voter & Tax Info Address Points.” From the pop-ups pane, you will need to click on Attribute expressions and then choose ‘Add expression’ from the pane that appears, as demonstrated in the image below.

We want our pop-up information to look like the following when it reports the taxing district: 730: Cascade Medical Center. In the expression builder that appears, first name your expression “Hospital District” and then type the following lines into the expression box:

var intersectLayer =Intersects(FeatureSetByName($map,”Hospital District”), $feature)

for (var f in intersectLayer){

    return f.DISTCAT+”: ” +f.NAME


Your expression builder should now look like the below image

After you click Done, your new expression will be added to the fields list as an option for you to use in your Pop-Ups. To view your new expression in the fields list, click on the Fields List icon in the light menu on the right of the map and then scroll until you find your new expression. In the example below, our expression’s field name is expression/expr54 but the alias is “Hospital District”.

Now that your expression has been added to your fields list, you can add it to any of your pop-up items, including the Title, Field List, and Text.


Recent Posts

Kara Utter
Kara has over 10 years of experience in geospatial and data science and is the owner of Dynamic Visions GIS. She excels at systems thinking and has a diverse background, having provided services to all levels of government, wildfire, natural resources, fisheries, and nonprofits. Her capacity to complete GIS needs assessments, improve efficiency, increase public access to information, provide methods of asset tracking, and quickly adapt to a changing environment has resulted in many successful project resolutions and National recognition through ESRI’s Special Achievements in GIS awards.

Sign up for our weekly newsletter
to receive content like this in your email box.