<?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 Rule from Attachment Table to Standalone Table in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-from-attachment-table-to-standalone/m-p/1222521#M605</link>
    <description>&lt;P&gt;We are trying to use an attribute rule that creates a record in a standalone table when an attachment is added to a point feature. The rule is assigned to the attachment table. We are having issues populating a variable for the GlobalID of the point feature. We have been able to get this action to work on a branch versioned, registered feature service in ArcGIS Pro (version 3.0.2) but have not been able to get it to work in Portal (Enterprise 11.0).&lt;/P&gt;&lt;P&gt;When adding an attachment via Portal, both of these lines return a blank GUID ({00000000-0000-0000-0000-000000000000}):&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//Attempt 1
var assetGUID = $feature.REL_GLOBALID;
//Attempt 2
var assetGUID = $feature["REL_GLOBALID"];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;And a workaround attempt like this returns null:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//Attempt 3
var relatedAssetFS = FeatureSetByRelationshipName($feature, 'RelationshipClassName',['*'],false);
var assetGUID;
if (Count(relatedAssetFS) == 0) {
    assetGUID = null;
} else {
    var relatedFeat = First(relatedAssetFS);
    assetGUID = relatedFeat.GLOBALID;
}&lt;/LI-CODE&gt;&lt;P&gt;All three of these attempts are successful when adding the attachment via Pro. It's almost as if Portal populates the REL_GLOBALID and creates the relationship &lt;EM&gt;after&lt;/EM&gt; running the attribute rule, while Pro does the opposite. Do Pro and Portal handle this process differently? Is there another way to write this expression? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/346994"&gt;@HusseinNasser2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 15:45:24 GMT</pubDate>
    <dc:creator>brimcel</dc:creator>
    <dc:date>2022-10-17T15:45:24Z</dc:date>
    <item>
      <title>Attribute Rule from Attachment Table to Standalone Table</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-from-attachment-table-to-standalone/m-p/1222521#M605</link>
      <description>&lt;P&gt;We are trying to use an attribute rule that creates a record in a standalone table when an attachment is added to a point feature. The rule is assigned to the attachment table. We are having issues populating a variable for the GlobalID of the point feature. We have been able to get this action to work on a branch versioned, registered feature service in ArcGIS Pro (version 3.0.2) but have not been able to get it to work in Portal (Enterprise 11.0).&lt;/P&gt;&lt;P&gt;When adding an attachment via Portal, both of these lines return a blank GUID ({00000000-0000-0000-0000-000000000000}):&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//Attempt 1
var assetGUID = $feature.REL_GLOBALID;
//Attempt 2
var assetGUID = $feature["REL_GLOBALID"];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;And a workaround attempt like this returns null:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//Attempt 3
var relatedAssetFS = FeatureSetByRelationshipName($feature, 'RelationshipClassName',['*'],false);
var assetGUID;
if (Count(relatedAssetFS) == 0) {
    assetGUID = null;
} else {
    var relatedFeat = First(relatedAssetFS);
    assetGUID = relatedFeat.GLOBALID;
}&lt;/LI-CODE&gt;&lt;P&gt;All three of these attempts are successful when adding the attachment via Pro. It's almost as if Portal populates the REL_GLOBALID and creates the relationship &lt;EM&gt;after&lt;/EM&gt; running the attribute rule, while Pro does the opposite. Do Pro and Portal handle this process differently? Is there another way to write this expression? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/346994"&gt;@HusseinNasser2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 15:45:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-from-attachment-table-to-standalone/m-p/1222521#M605</guid>
      <dc:creator>brimcel</dc:creator>
      <dc:date>2022-10-17T15:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule from Attachment Table to Standalone Table</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-from-attachment-table-to-standalone/m-p/1225148#M641</link>
      <description>&lt;P&gt;If you use Fiddler, can you compare the apply edits payload?&amp;nbsp; Maybe they are going down different paths.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 12:50:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-from-attachment-table-to-standalone/m-p/1225148#M641</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2022-10-25T12:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule from Attachment Table to Standalone Table</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-from-attachment-table-to-standalone/m-p/1679458#M1919</link>
      <description>&lt;P&gt;Did you find a resolution to this issue? I am experiencing the same problem.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 22:44:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-from-attachment-table-to-standalone/m-p/1679458#M1919</guid>
      <dc:creator>NatKrase</dc:creator>
      <dc:date>2026-01-22T22:44:07Z</dc:date>
    </item>
  </channel>
</rss>

