<?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 Attribute Rules and editing via Feature service with branch versioning in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-and-editing-via-feature-service/m-p/425855#M18876</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a feature class with calculation attribute rules set up. The rule works out an attribute based on an intersection with another feature class. The feature class is versioned (BV) and published as a web layer with feature access and version management. It is the only feature class in the service. I have a rule like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var fsOwnership = FeatureSetByName($datastore,"GIS.GISADMIN.Ownership",["propertyid"],true);&lt;BR /&gt;var fsOwnershipInts = Intersects(fsOwnership , Geometry($feature));&lt;BR /&gt;var ownership = First(fsOwnershipInts); &lt;BR /&gt;if(IsEmpty(ownership)){ &lt;BR /&gt;return 999; &lt;BR /&gt;}else{ &lt;BR /&gt; if(IsEmpty(ownership.propertyid)){ &lt;BR /&gt; return 999; &lt;BR /&gt; }else{ &lt;BR /&gt; return ownership.propertyid; &lt;BR /&gt; } &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;this rule is set for insert and update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When editing via the feature service in ArcGIS Pro, the rule fires correctly on an insert - but DOESN'T on an update. On an update it does this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="469782" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/469782_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so it can find it for an insert but not an update?&lt;/P&gt;&lt;P&gt;has anyone seen this? ArcGIS Enterprise 10.7.1 with SQL Server back end.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Fraser&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;the help does say&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;The map or feature service containing one or more layers from which to create a FeatureSet. Typically, this value is the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-weight: 300; font-size: 0.875em;"&gt;$map&lt;/CODE&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-weight: 300; font-size: 0.875em;"&gt;$datastore&lt;/CODE&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;global.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;which suggests it expects the layer to be in the FS. We can't do this as the other feature class isn't versioned and doesn't fit with the publishing strategy. And it also doesn't explain why it's working for the insert. trying $map doesn't work with ArcGIS Pro&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;&lt;IMG __jive_id="469783" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/469783_pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;Sorry - should have also mentioned worked as expected via direct db connection before branch versioning.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;EDIT 2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;Gets stranger - when you look at the rules in pro via design from the database connection you see&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;var fsOwnership = FeatureSetByName($datastore,"GIS.GISADMIN.Ownership",["propertyid"],true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;var featureSet=FeatureSetByName($datastore,"&lt;SPAN&gt;GIS.GISADMIN&lt;/SPAN&gt;.Resource", ["GlobalID","IsActive"], true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;if you add the feature service to the map and do design you see&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;var fsOwnership = FeatureSetByName($datastore,"{8CC3904F-4B31-4B74-98F4-9ECF13DE8F72}",["propertyid"],true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;var featureSet=FeatureSetByName($datastore,"L0Resource", ["GlobalID","IsActive"], true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;The first is the ID of the layer in the gdb items table. Don't know where it got the second from....&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Oct 2019 21:48:02 GMT</pubDate>
    <dc:creator>FraserHand1</dc:creator>
    <dc:date>2019-10-29T21:48:02Z</dc:date>
    <item>
      <title>Attribute Rules and editing via Feature service with branch versioning</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-and-editing-via-feature-service/m-p/425855#M18876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a feature class with calculation attribute rules set up. The rule works out an attribute based on an intersection with another feature class. The feature class is versioned (BV) and published as a web layer with feature access and version management. It is the only feature class in the service. I have a rule like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var fsOwnership = FeatureSetByName($datastore,"GIS.GISADMIN.Ownership",["propertyid"],true);&lt;BR /&gt;var fsOwnershipInts = Intersects(fsOwnership , Geometry($feature));&lt;BR /&gt;var ownership = First(fsOwnershipInts); &lt;BR /&gt;if(IsEmpty(ownership)){ &lt;BR /&gt;return 999; &lt;BR /&gt;}else{ &lt;BR /&gt; if(IsEmpty(ownership.propertyid)){ &lt;BR /&gt; return 999; &lt;BR /&gt; }else{ &lt;BR /&gt; return ownership.propertyid; &lt;BR /&gt; } &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;this rule is set for insert and update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When editing via the feature service in ArcGIS Pro, the rule fires correctly on an insert - but DOESN'T on an update. On an update it does this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="469782" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/469782_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so it can find it for an insert but not an update?&lt;/P&gt;&lt;P&gt;has anyone seen this? ArcGIS Enterprise 10.7.1 with SQL Server back end.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Fraser&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;the help does say&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;The map or feature service containing one or more layers from which to create a FeatureSet. Typically, this value is the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-weight: 300; font-size: 0.875em;"&gt;$map&lt;/CODE&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-weight: 300; font-size: 0.875em;"&gt;$datastore&lt;/CODE&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;global.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;which suggests it expects the layer to be in the FS. We can't do this as the other feature class isn't versioned and doesn't fit with the publishing strategy. And it also doesn't explain why it's working for the insert. trying $map doesn't work with ArcGIS Pro&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;&lt;IMG __jive_id="469783" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/469783_pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;Sorry - should have also mentioned worked as expected via direct db connection before branch versioning.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;EDIT 2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;Gets stranger - when you look at the rules in pro via design from the database connection you see&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;var fsOwnership = FeatureSetByName($datastore,"GIS.GISADMIN.Ownership",["propertyid"],true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;var featureSet=FeatureSetByName($datastore,"&lt;SPAN&gt;GIS.GISADMIN&lt;/SPAN&gt;.Resource", ["GlobalID","IsActive"], true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;if you add the feature service to the map and do design you see&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;var fsOwnership = FeatureSetByName($datastore,"{8CC3904F-4B31-4B74-98F4-9ECF13DE8F72}",["propertyid"],true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;var featureSet=FeatureSetByName($datastore,"L0Resource", ["GlobalID","IsActive"], true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;The first is the ID of the layer in the gdb items table. Don't know where it got the second from....&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2019 21:48:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-and-editing-via-feature-service/m-p/425855#M18876</guid>
      <dc:creator>FraserHand1</dc:creator>
      <dc:date>2019-10-29T21:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rules and editing via Feature service with branch versioning</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-and-editing-via-feature-service/m-p/425856#M18877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fraser,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When connected directly to your enterprise geodatabase, and viewing the attribute rule(s) in question can you please check the&amp;nbsp;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;exclude_from_client_evaluation property (i think its listed in the details pane near the bottom in an expansion &amp;gt;&amp;gt; ). If this is not set, try setting it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;From reading your description (the odd GUID in the rule, the differing behavior) this looks like a case where the smart client (Pro) cant find one of the tables in your rule (because its not in the service) and therefore cannot evaluate the script before sending the edits to the server. Having the rule only execute on the server, where the enterprise data store does know about your other table) should allow the execution to be success.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2019 00:30:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-and-editing-via-feature-service/m-p/425856#M18877</guid>
      <dc:creator>ColinZwicker</dc:creator>
      <dc:date>2019-10-30T00:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rules and editing via Feature service with branch versioning</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-and-editing-via-feature-service/m-p/425857#M18878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Colin - yes that did it - thanks. I completely missed that when we moved from direct db connections to feature services. I had previously read about that setting in the help as well. Thanks for the assist - much appreciated.&lt;/P&gt;&lt;P&gt;Fraser&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2019 01:13:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rules-and-editing-via-feature-service/m-p/425857#M18878</guid>
      <dc:creator>FraserHand1</dc:creator>
      <dc:date>2019-10-30T01:13:48Z</dc:date>
    </item>
  </channel>
</rss>

