<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Apply attribute within Zone in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/apply-attribute-within-zone/m-p/1526153#M87364</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I need some assistance. I feel like these are easy tasks but I can't remember how to execute them and my questions online are not bringing up what I need.&lt;/P&gt;&lt;P&gt;1.) I created 4 Zones on the map to divide the town. I want to select streets within a Zone and then apply an attribute. For example all streets in Zone A will be applied "A" for the "Belong" field.&lt;/P&gt;&lt;P&gt;2.) Then I want to create a Pop Up for the Zones layer to bring in the "Full Street Names" based on the "Belong" field that have the "A" designation.&lt;/P&gt;&lt;P&gt;See pictures below for reference. Thank you for your help.&lt;/P&gt;&lt;P&gt;*The pop-up currently is just text I inputted but I'd rather the program input names this time around.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Apply attribute designation based on roads with a certain zone." style="width: 984px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113310i2C255C7D292AEE95/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Create a pop up for the each Zone which includes roads maintained by CITY." style="width: 904px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113311i4C4E25F7A33C9D9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2024 20:42:44 GMT</pubDate>
    <dc:creator>mp8</dc:creator>
    <dc:date>2024-08-22T20:42:44Z</dc:date>
    <item>
      <title>Apply attribute within Zone</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-attribute-within-zone/m-p/1526153#M87364</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I need some assistance. I feel like these are easy tasks but I can't remember how to execute them and my questions online are not bringing up what I need.&lt;/P&gt;&lt;P&gt;1.) I created 4 Zones on the map to divide the town. I want to select streets within a Zone and then apply an attribute. For example all streets in Zone A will be applied "A" for the "Belong" field.&lt;/P&gt;&lt;P&gt;2.) Then I want to create a Pop Up for the Zones layer to bring in the "Full Street Names" based on the "Belong" field that have the "A" designation.&lt;/P&gt;&lt;P&gt;See pictures below for reference. Thank you for your help.&lt;/P&gt;&lt;P&gt;*The pop-up currently is just text I inputted but I'd rather the program input names this time around.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Apply attribute designation based on roads with a certain zone." style="width: 984px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113310i2C255C7D292AEE95/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Create a pop up for the each Zone which includes roads maintained by CITY." style="width: 904px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113311i4C4E25F7A33C9D9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 20:42:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-attribute-within-zone/m-p/1526153#M87364</guid>
      <dc:creator>mp8</dc:creator>
      <dc:date>2024-08-22T20:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Apply attribute within Zone</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-attribute-within-zone/m-p/1526183#M87369</link>
      <description>&lt;P&gt;The most simplistic way to complete the task would be to use the "select by location" option where your "input" would be the roads, the "relationship" would probably be "intersect" or "have their center in" and the "selecting features" would be the zone.&lt;/P&gt;&lt;P&gt;The problem you may come across is your roads may not end exactly where the line for your zone polygon is located. You could use the "pariwise clip" tool to clip out your roads using your zones, and then the "select by location" tool would only select the portion of a road that is contained within the zone itself. If you do not do something like this, it's likely you will have a road that crosses multiple zones which will mess with the complete accuracy of your zone field in the road attribute table.&lt;/P&gt;&lt;P&gt;There are other tools (such as union) that can combine the data of the two feature classes but if you're looking to keep your roads and zones features clean, I think the above workflow should do the job.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 21:46:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-attribute-within-zone/m-p/1526183#M87369</guid>
      <dc:creator>Eugene_Adkins</dc:creator>
      <dc:date>2024-08-22T21:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Apply attribute within Zone</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-attribute-within-zone/m-p/1562453#M90545</link>
      <description>&lt;P&gt;The popup profile can use &lt;A href="https://developers.arcgis.com/arcade/guide/featuresets/" target="_blank" rel="noopener"&gt;Arcade's FeatureSet functions&lt;/A&gt;&amp;nbsp;with $map to get info about features intersecting a clicked feature or matching a query that references the clicked feature.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In these examples I have a Streets layer and a Regions polygon layer in my map. The Streets layer has &lt;EM&gt;Name&lt;/EM&gt;&amp;nbsp;and &lt;EM&gt;Included&lt;/EM&gt; attributes. I include these expressions in the Regions popup expressions so I can reference them in the popup.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Example 1&lt;/STRONG&gt;: Return the names of all streets intersecting the clicked region polygon feature.&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;var streets = FeatureSetByName($map, "Streets", ["Name"], true);
//Get all street intersecting the clicked feature, and sort them by Name
var streetsSorted = OrderBy(Intersects(streets, $feature), "Name ASC");

var streetNames = [];
for (var street in streetsSorted) {
  //Only add if it's not already in the array
  if (!Includes(streetNames, street.Name)) {
    //Add to the array
    Push(streetNames, street.Name);
  }
}
return Concatenate(streetNames, ", ");&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Example 2&lt;/STRONG&gt;: Return the names of streets intersecting the clicked region polygon feature &lt;EM&gt;and&lt;/EM&gt; matching an attribute query&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;var streets = FeatureSetByName($map, "Streets", ["Name", "Included"], true);
//Filter the streets to only those matching an attribute query
var filterQuery = "Included = 'yes'";
var matchingStreets = Filter(streets, filterQuery);

//Get the matching streets that intersect the clicked feature, and sort them by Name
var matchingStreetsSorted = OrderBy(Intersects(matchingStreets, $feature), "Name ASC");

var streetNames = [];
for (var street in matchingStreetsSorted) {
  //Only add if it's not already in the array
  if (!Includes(streetNames, street.Name)) {
    //Add to the array
    Push(streetNames, street.Name);
  }
}
return Concatenate(streetNames, ", ");&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JesseWickizer_0-1732571303018.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120414i654CEDEE87F40BCE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JesseWickizer_0-1732571303018.png" alt="JesseWickizer_0-1732571303018.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify these expressions to match your data schema and desired sql query.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2024 21:51:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-attribute-within-zone/m-p/1562453#M90545</guid>
      <dc:creator>JesseWickizer</dc:creator>
      <dc:date>2024-11-25T21:51:24Z</dc:date>
    </item>
  </channel>
</rss>

