<?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: Arcade Script For Layer To Layer Calculation in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-script-for-layer-to-layer-calculation/m-p/1506228#M60288</link>
    <description>&lt;P&gt;If you have a relationship set up between the two layers, you can use this syntax to get an attribute from the other layer&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var related = FeatureSetByRelationshipName($feature, 'your relationship name');

if (Count(related) &amp;gt; 0) {
  var record = First(related);
  return record.theField;
}&lt;/LI-CODE&gt;&lt;P&gt;If not, you can use this syntax to get the other feature.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var asset_id = $feature.GUID
var fs = FeatureSetByPortalItem(
  Portal('yourPortal'),
  'itemId',
  0,
  ['*'],
  false
);
var related = First(Filter(fs, "GlobalID = @asset_id"))

if(related != null) return related.theField&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 17 Jul 2024 16:29:15 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2024-07-17T16:29:15Z</dc:date>
    <item>
      <title>Arcade Script For Layer To Layer Calculation</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-script-for-layer-to-layer-calculation/m-p/1506200#M60282</link>
      <description>&lt;P&gt;I am wanting to populate a field on one layer from a field with the same name on another layer based on a common global ID and am having difficulty figuring out the arcade code to do so.&amp;nbsp; I do not have much experience with this kind of coding using arcade.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 15:34:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-script-for-layer-to-layer-calculation/m-p/1506200#M60282</guid>
      <dc:creator>JonFrederiksen</dc:creator>
      <dc:date>2024-07-17T15:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Script For Layer To Layer Calculation</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-script-for-layer-to-layer-calculation/m-p/1506228#M60288</link>
      <description>&lt;P&gt;If you have a relationship set up between the two layers, you can use this syntax to get an attribute from the other layer&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var related = FeatureSetByRelationshipName($feature, 'your relationship name');

if (Count(related) &amp;gt; 0) {
  var record = First(related);
  return record.theField;
}&lt;/LI-CODE&gt;&lt;P&gt;If not, you can use this syntax to get the other feature.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var asset_id = $feature.GUID
var fs = FeatureSetByPortalItem(
  Portal('yourPortal'),
  'itemId',
  0,
  ['*'],
  false
);
var related = First(Filter(fs, "GlobalID = @asset_id"))

if(related != null) return related.theField&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 17 Jul 2024 16:29:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-script-for-layer-to-layer-calculation/m-p/1506228#M60288</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-07-17T16:29:15Z</dc:date>
    </item>
  </channel>
</rss>

