<?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: Arcade and Shape_Length in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/arcade-and-shape-length/m-p/1194354#M476</link>
    <description>&lt;P&gt;These work for me...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For FGDB:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return $feature.Shape_Length&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For EGDB (SQL Server):&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return $feature['Shape.STLength()']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2022 09:35:52 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2022-07-21T09:35:52Z</dc:date>
    <item>
      <title>Arcade and Shape_Length</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/arcade-and-shape-length/m-p/1191061#M466</link>
      <description>&lt;P&gt;(reposting to this group. original post to the data management group, but not much response)&lt;/P&gt;&lt;P&gt;I am trying to create an Attribute Rule that on record update in a line feature class that grabs the value in Shape_Length and copies it into another field. But in the Arcade text editor when choosing the Shape_Length field, it populates the script with $feature['Shape.STLength()'], the underlying method that populates that field in the db. Well, when the system tries to evaluate the rule upon record update, it errors out saying that it can't find the field [Shape.STLength()]. Well yeah, that is not a field, it is an ST geom method. How does one get the current value in Shape_Length without calling the underlying ST geom method? The Length() method leaves me a bit nervous because of the caveat of changing the results based on the scale of the map!? Yikes. And the projection I am using is NAD 83, so I can't use the LengthGeodetic() method. Any ideas greatly appreciated.&lt;/P&gt;&lt;P&gt;For reference, screen caps of a line Feat Class field def in both an Ent GDB (SQL Server) and a FGDB:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LorenMueller_0-1657679276378.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/45756iC412FB16AEC5C3F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LorenMueller_0-1657679276378.png" alt="LorenMueller_0-1657679276378.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Esri 10.9.1, Pro 2.9.3)&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 02:28:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/arcade-and-shape-length/m-p/1191061#M466</guid>
      <dc:creator>LorenMueller</dc:creator>
      <dc:date>2022-07-13T02:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade and Shape_Length</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/arcade-and-shape-length/m-p/1193753#M473</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/346994"&gt;@HusseinNasser2&lt;/a&gt;&amp;nbsp; - nothing? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 03:21:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/arcade-and-shape-length/m-p/1193753#M473</guid>
      <dc:creator>LorenMueller</dc:creator>
      <dc:date>2022-07-20T03:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade and Shape_Length</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/arcade-and-shape-length/m-p/1194354#M476</link>
      <description>&lt;P&gt;These work for me...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For FGDB:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return $feature.Shape_Length&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For EGDB (SQL Server):&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return $feature['Shape.STLength()']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 09:35:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/arcade-and-shape-length/m-p/1194354#M476</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-07-21T09:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade and Shape_Length</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/arcade-and-shape-length/m-p/1194507#M477</link>
      <description>&lt;P&gt;It looks like a bug reading the shape_length st function in the client side. I assume you are consuming the SQL Server feature class through a feature service? I can't reproduce this when running direct connect.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We will look into it, meanwhile as a workaround, try Excluding the Attribute rule from application evaluation and restart the service, that should do it. That will skip the client side evaluation and only do server side which we know it works.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HusseinNasser2_0-1658422353310.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/46409iEDAF1A76F8F8B5C6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HusseinNasser2_0-1658422353310.png" alt="HusseinNasser2_0-1658422353310.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 16:53:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/arcade-and-shape-length/m-p/1194507#M477</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2022-07-21T16:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade and Shape_Length</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/arcade-and-shape-length/m-p/1195285#M479</link>
      <description>&lt;P&gt;That was it &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/346994"&gt;@HusseinNasser2&lt;/a&gt;&amp;nbsp;.&amp;nbsp; Yes, reading/editing via the Feat Svc. Excluding from client eval works.&amp;nbsp; I think that this solution will work for my use case, but perhaps others will need this to work via client eval in the future, so thank you for sending the issue to the Pro team.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 02:42:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/arcade-and-shape-length/m-p/1195285#M479</guid>
      <dc:creator>LorenMueller</dc:creator>
      <dc:date>2022-07-25T02:42:41Z</dc:date>
    </item>
  </channel>
</rss>

