<?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: Using FeatureSetByRelationshipName in Attribute Rules in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/using-featuresetbyrelationshipname-in-attribute/m-p/1106547#M46578</link>
    <description>&lt;P&gt;Because&amp;nbsp;&lt;SPAN&gt;FeatureSetByRelationshipName returns a FeatureSet that may have more than one row. You can't just return it you have to get a value from a row.&amp;nbsp; Assuming you have a one to one relationship you can just get the &lt;A title="First" href="https://developers.arcgis.com/arcade/function-reference/data_functions/#first" target="_self"&gt;First&lt;/A&gt; one:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if (!IsEmpty(test))
{
return First(test).COMMENT_
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;If you have one to many, you would have to apply more logic to decide which one you want.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Oct 2021 21:57:54 GMT</pubDate>
    <dc:creator>JimmyBowden</dc:creator>
    <dc:date>2021-10-11T21:57:54Z</dc:date>
    <item>
      <title>Using FeatureSetByRelationshipName in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-featuresetbyrelationshipname-in-attribute/m-p/1033161#M38172</link>
      <description>&lt;P&gt;I am new to both Arcade and Attribute Rules. I am trying to create a calculation rule that is triggered by inserts, but my expression using FeatureSetByRelationshipName doesn't seem to be doing anything.&lt;/P&gt;&lt;P&gt;Here is the expression:&lt;/P&gt;&lt;P&gt;var test = FeatureSetByRelationshipName($feature, 'FH_MR_TR_REL', ["COMMENT_"], false);&lt;/P&gt;&lt;P&gt;return test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am applying the attribute rule to a table and trying to pull data from a field in a related feature class. 'FH_MR_TR_REL' is the relationship class and 'COMMENT_' is the field in the related feature class that I am trying to pull from.&lt;/P&gt;&lt;P&gt;I didn't get any errors, but the destination field remains null after inserting a new table record. I am sure I missing something obvious; any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 21:55:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-featuresetbyrelationshipname-in-attribute/m-p/1033161#M38172</guid>
      <dc:creator>Z_Knoble</dc:creator>
      <dc:date>2021-03-04T21:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using FeatureSetByRelationshipName in Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-featuresetbyrelationshipname-in-attribute/m-p/1106547#M46578</link>
      <description>&lt;P&gt;Because&amp;nbsp;&lt;SPAN&gt;FeatureSetByRelationshipName returns a FeatureSet that may have more than one row. You can't just return it you have to get a value from a row.&amp;nbsp; Assuming you have a one to one relationship you can just get the &lt;A title="First" href="https://developers.arcgis.com/arcade/function-reference/data_functions/#first" target="_self"&gt;First&lt;/A&gt; one:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if (!IsEmpty(test))
{
return First(test).COMMENT_
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;If you have one to many, you would have to apply more logic to decide which one you want.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 21:57:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-featuresetbyrelationshipname-in-attribute/m-p/1106547#M46578</guid>
      <dc:creator>JimmyBowden</dc:creator>
      <dc:date>2021-10-11T21:57:54Z</dc:date>
    </item>
  </channel>
</rss>

