<?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: Count Feature Class records using Attribute Rules in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/count-feature-class-records-using-attribute-rules/m-p/1287280#M68959</link>
    <description>&lt;P&gt;Maybe run the check geometry tool and see if there is a invalid geometry or something.&lt;/P&gt;&lt;P&gt;I get the exact count using your code in 2.9.3 and 3.1.1&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;&lt;P&gt;Actually, on second thought, I think it is working as expected.&amp;nbsp; If you have 8 values in there already, then try to add one, it should be number 9.&amp;nbsp; However, since it is showing as error message, it is what "would" be there if it were to create the feature (since feature isn't created on error).&lt;/P&gt;&lt;P&gt;Perhaps try updating the field instead of returning an erromessage and see if that "fixes" it:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;count(FeatureSetbyName($datastore, "Room"))&lt;/LI-CODE&gt;&lt;P&gt;R_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 May 2023 15:26:44 GMT</pubDate>
    <dc:creator>RhettZufelt</dc:creator>
    <dc:date>2023-05-09T15:26:44Z</dc:date>
    <item>
      <title>Count Feature Class records using Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/count-feature-class-records-using-attribute-rules/m-p/1287195#M68943</link>
      <description>&lt;P&gt;I created an attribute rule with the triggering event "Update" in an attempt to obtain the number of records for the&amp;nbsp;feature class.&lt;/P&gt;&lt;P&gt;the code is this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return{"errorMessage" : "An "+count(FeatureSetbyName($datastore, "Room"))}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;whenever I update any records on the table, the count of records is the actual number plus one.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 722px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/70217i63B43C15DEE2D6AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 12:28:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/count-feature-class-records-using-attribute-rules/m-p/1287195#M68943</guid>
      <dc:creator>Mohamed_Gamal</dc:creator>
      <dc:date>2023-05-09T12:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Count Feature Class records using Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/count-feature-class-records-using-attribute-rules/m-p/1287280#M68959</link>
      <description>&lt;P&gt;Maybe run the check geometry tool and see if there is a invalid geometry or something.&lt;/P&gt;&lt;P&gt;I get the exact count using your code in 2.9.3 and 3.1.1&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;&lt;P&gt;Actually, on second thought, I think it is working as expected.&amp;nbsp; If you have 8 values in there already, then try to add one, it should be number 9.&amp;nbsp; However, since it is showing as error message, it is what "would" be there if it were to create the feature (since feature isn't created on error).&lt;/P&gt;&lt;P&gt;Perhaps try updating the field instead of returning an erromessage and see if that "fixes" it:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;count(FeatureSetbyName($datastore, "Room"))&lt;/LI-CODE&gt;&lt;P&gt;R_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 15:26:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/count-feature-class-records-using-attribute-rules/m-p/1287280#M68959</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-05-09T15:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count Feature Class records using Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/count-feature-class-records-using-attribute-rules/m-p/1287567#M68990</link>
      <description>&lt;P&gt;Greetings, Rhett Zufelt&lt;/P&gt;&lt;P&gt;First of all, I appreciate your reply. There are no flaws in the records' geometry, which was your initial concern. It is therefore illogical for the case, I am displaying on this case to have nine records because I am updating one of them not&amp;nbsp;adding a new one. The error message just informs me of the count's value before continuing with other&amp;nbsp;procedures.&lt;/P&gt;&lt;P&gt;Before counting the records, I simply need to apply a filter, however,&amp;nbsp;I'm not sure why this issue is occurring.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Count(Filter(FeatureSetbyName($datastore, "Floor"),"1 = 1"));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 06:22:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/count-feature-class-records-using-attribute-rules/m-p/1287567#M68990</guid>
      <dc:creator>Mohamed_Gamal</dc:creator>
      <dc:date>2023-05-10T06:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Count Feature Class records using Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/count-feature-class-records-using-attribute-rules/m-p/1287739#M69012</link>
      <description>&lt;P&gt;Guess I should have payed more attention to the original post.&amp;nbsp; I had Insert enabled on the tool, so was a bit different.&lt;/P&gt;&lt;P&gt;Even so, I was not able to reproduce with just update, and was still geting the correct count (testing with data from SQL server EGDB):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RhettZufelt_0-1683731224285.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/70315i8FEE9DABBF55AE68/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RhettZufelt_0-1683731224285.png" alt="RhettZufelt_0-1683731224285.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, when testing with the same feature class/attribute rule exported to a FGDB feature class:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RhettZufelt_1-1683731297999.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/70316iA3DDE3A4BE4B8FF5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RhettZufelt_1-1683731297999.png" alt="RhettZufelt_1-1683731297999.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am then consistently getting the actual count + 1 as you are seeing.&amp;nbsp; So, since they report different values from the same rule/data, just different sources, I'd suspect you have discovered yet another bug.&lt;/P&gt;&lt;P&gt;Might want to start a tech support request so that this issue might get addressed.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 15:12:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/count-feature-class-records-using-attribute-rules/m-p/1287739#M69012</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-05-10T15:12:51Z</dc:date>
    </item>
  </channel>
</rss>

