<?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 - Join features attribute in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-join-features-attribute/m-p/1207601#M6754</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Johannes,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your suggestion, now a different&amp;nbsp;error is shown as below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Execution Error:Invalid Parameter&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 09:30:21 GMT</pubDate>
    <dc:creator>junaidjawaid</dc:creator>
    <dc:date>2022-08-30T09:30:21Z</dc:date>
    <item>
      <title>Arcade - Join features attribute</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-join-features-attribute/m-p/1207567#M6751</link>
      <description>&lt;P&gt;Hi, I am trying to combine the attributes from two layers hosted in the ArcGIS server with following code in Arcade Data Expression . In both layers, the fields on which the join will based is of the same data type i.e. &lt;STRONG&gt;String. The expression&amp;nbsp;is returning following error.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Create empty features array and feat object&lt;BR /&gt;var features = [];&lt;BR /&gt;var feat;&lt;/P&gt;&lt;P&gt;for (var t in CS) {&lt;BR /&gt;var tableID = t["ID"]&lt;BR /&gt;for (var p in Filter(DTS, "FEEDERID = "+tableID)){&lt;BR /&gt;feat = {&lt;BR /&gt;attributes: {&lt;BR /&gt;Name: t["Name"],&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Push(features, feat)&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;var joinedDict = {&lt;BR /&gt;fields: [&lt;BR /&gt;{ name: "Name", type: "esriFieldTypeString" },&lt;BR /&gt;],&lt;BR /&gt;'geometryType': '',&lt;BR /&gt;'features':features&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;// Return dictionary cast as a feature set&lt;BR /&gt;return FeatureSet(joinedDict);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error Snapshot :&amp;nbsp;&lt;/STRONG&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="junaidjawaid_0-1661839838376.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/49798i6CB252867D1C9608/image-size/medium?v=v2&amp;amp;px=400" role="button" title="junaidjawaid_0-1661839838376.png" alt="junaidjawaid_0-1661839838376.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 06:11:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-join-features-attribute/m-p/1207567#M6751</guid>
      <dc:creator>junaidjawaid</dc:creator>
      <dc:date>2022-08-30T06:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Join features attribute</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-join-features-attribute/m-p/1207594#M6753</link>
      <description>&lt;P&gt;The field type is string, so your SQL filter expression should look for string values. You have to enclose your tableID with single quotes:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;for (var p in Filter(DTS, "FEEDERID = '"+tableID+"'")){
//...
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Better yet, let Arcade handle the types:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;for (var p in Filter(DTS, "FEEDERID = @tableID")){
//...
}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 30 Aug 2022 08:30:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-join-features-attribute/m-p/1207594#M6753</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-08-30T08:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Join features attribute</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-join-features-attribute/m-p/1207601#M6754</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Johannes,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your suggestion, now a different&amp;nbsp;error is shown as below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Execution Error:Invalid Parameter&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 09:30:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-join-features-attribute/m-p/1207601#M6754</guid>
      <dc:creator>junaidjawaid</dc:creator>
      <dc:date>2022-08-30T09:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Join features attribute</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-join-features-attribute/m-p/1207604#M6755</link>
      <description>&lt;P&gt;FeatureSet() needs a json string, not a dictionary. Try this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return FeatureSet(Text(joinedDict));&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 30 Aug 2022 09:37:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-join-features-attribute/m-p/1207604#M6755</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-08-30T09:37:39Z</dc:date>
    </item>
  </channel>
</rss>

