<?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 Can feature service be used as parameter in Attribute rule? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/can-feature-service-be-used-as-parameter-in/m-p/246963#M10878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the following, I get an error. Is it even possible to use a feature service as an input in an attribute rule? What I'm trying to do is calculate a value on insert/update based on the intersecting value from the feature service.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var fsPolyBoundary &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;  FeatureSetByName&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"https://services1.arcgis.com/fBc8EJBxQRMcHlei/arcgis/rest/services/NABAT_CONUS_10x10_KM_GRID_CELLS/FeatureServer/0"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"GRTS_ID "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; true&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
var fsPoly &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Intersects&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsPolyBoundary&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Geometry&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
var loc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; First &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsPoly&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

var name  &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;loc &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; null&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
   &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;  &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"errorMessage"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Point must be created in a Grid."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; 
   name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;  loc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LOC_NAME

&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; name &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" - "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LOC_NAME&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 12:17:23 GMT</pubDate>
    <dc:creator>ThomasColson</dc:creator>
    <dc:date>2021-12-11T12:17:23Z</dc:date>
    <item>
      <title>Can feature service be used as parameter in Attribute rule?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/can-feature-service-be-used-as-parameter-in/m-p/246963#M10878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the following, I get an error. Is it even possible to use a feature service as an input in an attribute rule? What I'm trying to do is calculate a value on insert/update based on the intersecting value from the feature service.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var fsPolyBoundary &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;  FeatureSetByName&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"https://services1.arcgis.com/fBc8EJBxQRMcHlei/arcgis/rest/services/NABAT_CONUS_10x10_KM_GRID_CELLS/FeatureServer/0"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"GRTS_ID "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; true&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
var fsPoly &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Intersects&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsPolyBoundary&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Geometry&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
var loc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; First &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsPoly&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

var name  &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;loc &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; null&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
   &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;  &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"errorMessage"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Point must be created in a Grid."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; 
   name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;  loc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LOC_NAME

&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; name &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" - "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LOC_NAME&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:17:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/can-feature-service-be-used-as-parameter-in/m-p/246963#M10878</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2021-12-11T12:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can feature service be used as parameter in Attribute rule?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/can-feature-service-be-used-as-parameter-in/m-p/246964#M10879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/8888"&gt;Thomas Colson&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FeatureSetByName will requiere you to provide the exact name of the layer in the current data store and not the URL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Also have a look at this blog:&amp;nbsp;&lt;/EM&gt;&lt;A class="link-titled" href="https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/advanced-gdb-attribute-rules-editing-external-features-with-attribute-rules/" title="https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/advanced-gdb-attribute-rules-editing-external-features-with-attribute-rules/"&gt;Advanced Attribute Rules – Editing features on another class with attribute rules&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2020 14:40:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/can-feature-service-be-used-as-parameter-in/m-p/246964#M10879</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-01-16T14:40:36Z</dc:date>
    </item>
  </channel>
</rss>

