<?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: Calculate and Stop Attachment(s) When The Size of Attachment is More than a default Size in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/calculate-and-stop-attachment-s-when-the-size-of/m-p/1326550#M1109</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN&gt;Hussein, This is exactly what I was looking for&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Sep 2023 19:48:48 GMT</pubDate>
    <dc:creator>BHK</dc:creator>
    <dc:date>2023-09-07T19:48:48Z</dc:date>
    <item>
      <title>Calculate and Stop Attachment(s) When The Size of Attachment is More than a default Size</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/calculate-and-stop-attachment-s-when-the-size-of/m-p/1326533#M1107</link>
      <description>&lt;P&gt;Using ArcGIS Pro 2.7.1and having a simple Point feature class in GDB (schools) enabled for Attachment, I am trying to stop and prompt error message when user attached a big size images into the feature class.&lt;/P&gt;&lt;P&gt;I created a Field called `Attach_Size` in the School feature class and assigned a Calculation (Add Immediate Calculation Rule) to apply the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; If(Count(Attachments($feature)) &amp;gt; 0) {
      return Attachments(size)
  }   &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this is not returning any thing either when creating a new feature or editing&amp;nbsp; existing feature. Can you please let me know what I am missing here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 18:55:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/calculate-and-stop-attachment-s-when-the-size-of/m-p/1326533#M1107</guid>
      <dc:creator>BHK</dc:creator>
      <dc:date>2023-09-07T18:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and Stop Attachment(s) When The Size of Attachment is More than a default Size</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/calculate-and-stop-attachment-s-when-the-size-of/m-p/1326540#M1108</link>
      <description>&lt;P&gt;So you want to add a constraint rule on the attachment table that says something like this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if ($feature.DATA_SIZE &amp;gt; 1000) return false;
return true;&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HusseinNasser2_1-1694114780347.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80135iA09503630FE86453/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HusseinNasser2_1-1694114780347.png" alt="HusseinNasser2_1-1694114780347.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HusseinNasser2_0-1694114754793.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80134i0366F7C309D34233/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HusseinNasser2_0-1694114754793.png" alt="HusseinNasser2_0-1694114754793.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 19:26:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/calculate-and-stop-attachment-s-when-the-size-of/m-p/1326540#M1108</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2023-09-07T19:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and Stop Attachment(s) When The Size of Attachment is More than a default Size</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/calculate-and-stop-attachment-s-when-the-size-of/m-p/1326550#M1109</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN&gt;Hussein, This is exactly what I was looking for&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 19:48:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/calculate-and-stop-attachment-s-when-the-size-of/m-p/1326550#M1109</guid>
      <dc:creator>BHK</dc:creator>
      <dc:date>2023-09-07T19:48:48Z</dc:date>
    </item>
  </channel>
</rss>

