<?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 Re: Attribute Rule to Intersect using Portal Item in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-intersect-using-portal-item/m-p/1357726#M76055</link>
    <description>&lt;P&gt;There's an example very similar to what you want to do using Arcade expressions in an ArcGIS Field Maps blog posting.&amp;nbsp; Since Arcade is a platform wide expression language, the Arcade code in example 1 of this &lt;A href="https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/common-calculated-expressions-for-arcgis-field-maps/" target="_self"&gt;blog&lt;/A&gt; should work in ArcGIS Pro as an &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/calculation-attribute-rules.htm" target="_self"&gt;calculated attribute rule&lt;/A&gt;.&amp;nbsp; Not sure how this would work in a web app though...&lt;/P&gt;</description>
    <pubDate>Wed, 06 Dec 2023 22:11:10 GMT</pubDate>
    <dc:creator>Robert_LeClair</dc:creator>
    <dc:date>2023-12-06T22:11:10Z</dc:date>
    <item>
      <title>Attribute Rule to Intersect using Portal Item</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-intersect-using-portal-item/m-p/1357408#M76000</link>
      <description>&lt;P&gt;I would like to create an Attribute Rule that intersects new points with a polygon that is hosted in our ENT portal.&amp;nbsp;&lt;BR /&gt;FeatureSetByPortalitem function seems like it would be the best function, but it's not available in the Function list in the attribute rules. I'm new to this, so I'm asking anyway.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/portal_functions/#featuresetbyportalitem" target="_blank"&gt;https://developers.arcgis.com/arcade/function-reference/portal_functions/#featuresetbyportalitem&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;My end goal is to publish a service that users with edit in Web App Builder. I'd like to populate as many attributes as possible automatically. Ease the burden on the program users. I currently have a domain set for county value, so there's a pick list, but it would be nice if I could calculate the county based on where the point is placed. I have an attribute rule that calculates email address, based on a domain list of people and this led me to think maybe I could do the same for county.&lt;BR /&gt;&lt;BR /&gt;This made my idea look possible &lt;A href="https://community.esri.com/t5/arcgis-pro-questions/how-to-add-values-from-polygon-to-points-which-are/td-p/1224509" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-questions/how-to-add-values-from-polygon-to-points-which-are/td-p/1224509&lt;/A&gt;&amp;nbsp;but our county layer is hosted by our enterprise team - it isn't in my database.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/arcade-and-attribute-rules-featuresetbyname/td-p/1269597" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-questions/arcade-and-attribute-rules-featuresetbyname/td-p/1269597&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Maybe FeatureSetById would work?&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyid" target="_blank"&gt;https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyid&lt;/A&gt;&lt;BR /&gt;But I cannot get it to find/load my table. I keep getting the error: Invalid expression. Table not found.&amp;nbsp;&lt;BR /&gt;My code for that line looks like this&lt;/P&gt;&lt;P&gt;var polygons = FeatureSetById($datastore, `1`, ['Name'])&lt;BR /&gt;&lt;BR /&gt;When I add that layer to my map it comes in as a single item in a group. Even though I've pulled it out of the group, could this be the issue? Is it seen as a feature collection?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CountyGroup.png" style="width: 298px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88160i84FE31DA631A59A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="CountyGroup.png" alt="CountyGroup.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have checked the UniqueID box in the map properties, maybe I have the wrong ID?&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CountyID.png" style="width: 381px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88163i6D40ED631E929415/image-dimensions/381x277?v=v2" width="381" height="277" role="button" title="CountyID.png" alt="CountyID.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I'd appreciate any help on this one. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 15:50:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-intersect-using-portal-item/m-p/1357408#M76000</guid>
      <dc:creator>Jennifer_Parmeley</dc:creator>
      <dc:date>2023-12-06T15:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule to Intersect using Portal Item</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-intersect-using-portal-item/m-p/1357449#M76004</link>
      <description>&lt;P&gt;I believe for $datastore to work the County Layer would need to be in your database and $map can't be used in a attribute rule.&lt;/P&gt;&lt;P&gt;Not sure what your options are for web apps. One idea would be to setup a web map with the County Layer and the layer you are editing. You could then configure a Form that can calculate fields using Arcade Expressions. At this level you could use FeatureSetByName and $map to pull in the County Layer data and Intersects() with your layer and populate the field.&lt;BR /&gt;&lt;BR /&gt;You wouldn't be able to use WAB, but you could use InstantApp Side Bar Template with Editor or create a Experience Builder both of which can use the Form you configure in the web map builder. Field Maps would also work.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 16:35:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-intersect-using-portal-item/m-p/1357449#M76004</guid>
      <dc:creator>rlyding</dc:creator>
      <dc:date>2023-12-06T16:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule to Intersect using Portal Item</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-intersect-using-portal-item/m-p/1357726#M76055</link>
      <description>&lt;P&gt;There's an example very similar to what you want to do using Arcade expressions in an ArcGIS Field Maps blog posting.&amp;nbsp; Since Arcade is a platform wide expression language, the Arcade code in example 1 of this &lt;A href="https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/common-calculated-expressions-for-arcgis-field-maps/" target="_self"&gt;blog&lt;/A&gt; should work in ArcGIS Pro as an &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/calculation-attribute-rules.htm" target="_self"&gt;calculated attribute rule&lt;/A&gt;.&amp;nbsp; Not sure how this would work in a web app though...&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 22:11:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-intersect-using-portal-item/m-p/1357726#M76055</guid>
      <dc:creator>Robert_LeClair</dc:creator>
      <dc:date>2023-12-06T22:11:10Z</dc:date>
    </item>
  </channel>
</rss>

