<?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 a related table in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-from-a-related-table/m-p/1004320#M34508</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;After having searched a lot, I am writing to you because I am desperate not to find!I try to fill a field thanks to a join with an associated table. In this field, I need to retrieve a value from this table. The relationship is 1-M but I have to take the first row.&lt;/P&gt;&lt;P&gt;I have a script but nothing happens:&lt;/P&gt;&lt;P&gt;var parent_id = $feature.OBJECTID&lt;BR /&gt;var tbl = FeatureSetByName($datastore, "TYPES_COMMERCE");&lt;BR /&gt;// Filter the parent class for only related features&lt;BR /&gt;var parent_records = Filter(tbl, "OBJECTID = @parent_id");&lt;BR /&gt;var i = 0;&lt;BR /&gt;var new_value = 'Operational';&lt;BR /&gt;// Loop through each feature, create a dict of the Global ID and the new value date&lt;BR /&gt;for (var row in parent_records) {&lt;BR /&gt;new_value= row['TYPE_COMMERCE']&amp;nbsp;//Test on one value to see if it's work&lt;BR /&gt;}&lt;BR /&gt;return new_value&lt;/P&gt;&lt;P&gt;Any help will be very appreciated!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Nov 2020 17:04:31 GMT</pubDate>
    <dc:creator>KARIMLABIDI</dc:creator>
    <dc:date>2020-11-24T17:04:31Z</dc:date>
    <item>
      <title>Attribute rule from a related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-from-a-related-table/m-p/1004320#M34508</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;After having searched a lot, I am writing to you because I am desperate not to find!I try to fill a field thanks to a join with an associated table. In this field, I need to retrieve a value from this table. The relationship is 1-M but I have to take the first row.&lt;/P&gt;&lt;P&gt;I have a script but nothing happens:&lt;/P&gt;&lt;P&gt;var parent_id = $feature.OBJECTID&lt;BR /&gt;var tbl = FeatureSetByName($datastore, "TYPES_COMMERCE");&lt;BR /&gt;// Filter the parent class for only related features&lt;BR /&gt;var parent_records = Filter(tbl, "OBJECTID = @parent_id");&lt;BR /&gt;var i = 0;&lt;BR /&gt;var new_value = 'Operational';&lt;BR /&gt;// Loop through each feature, create a dict of the Global ID and the new value date&lt;BR /&gt;for (var row in parent_records) {&lt;BR /&gt;new_value= row['TYPE_COMMERCE']&amp;nbsp;//Test on one value to see if it's work&lt;BR /&gt;}&lt;BR /&gt;return new_value&lt;/P&gt;&lt;P&gt;Any help will be very appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 17:04:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-from-a-related-table/m-p/1004320#M34508</guid>
      <dc:creator>KARIMLABIDI</dc:creator>
      <dc:date>2020-11-24T17:04:31Z</dc:date>
    </item>
  </channel>
</rss>

