<?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 Having trouble with joining Feature Layer and Feature Table in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/having-trouble-with-joining-feature-layer-and/m-p/1135357#M5754</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am joining a feature layer with a feature table which is a repeated table. I think the parameters are correct but when I click on &lt;STRONG&gt;T&lt;/STRONG&gt;&lt;STRONG&gt;est&lt;/STRONG&gt;&amp;nbsp;button, nothing appears. It doesn't load data. I get GlobalID from the main layer and ParentGlobalID from the feature table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var portal = Portal("https://www.arcgis.com/")
var mainfs = FeatureSetByPortalItem(portal,"365e0c417cd34bfdb06039c76715079e",0,["*"],false)
var tablefs = FeatureSetByPortalItem(portal,"365e0c417cd34bfdb06039c76715079e",1,["*"],false)

var joinedDict = {
  fields: [
    { name: "FeatureID", type: "esriFieldTypeGlobalID" },
    { name: "Grant", type: "esriFieldTypeString" },	
    { name: "HazardID", type: "esriFieldTypeString" },
    { name: "DTAreaCleared", type: "esriFieldTypeDouble" },
  ],
'geometryType': '',
'features':[]}

var i = 0;
for (var t in tablefs) {
    var tableID = t["ParentGlobalID"]
    var filt_mainfs = Filter(mainfs, "GlobalID = @tableID")
    for (var p in filt_mainfs){
        joinedDict.features[i] = {
            attributes: {
                FeatureID: tableID,
                Grant: p["Grant_Number"],
				HazardID: t["Hazard_ID"],
                DTAreaCleared: t["DT_Area_Cleared"],
            }
        }
    }
i++
}

//return dictionary
return FeatureSet(Text(joinedDict));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jan 2022 06:50:28 GMT</pubDate>
    <dc:creator>SayedWali</dc:creator>
    <dc:date>2022-01-25T06:50:28Z</dc:date>
    <item>
      <title>Having trouble with joining Feature Layer and Feature Table</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/having-trouble-with-joining-feature-layer-and/m-p/1135357#M5754</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am joining a feature layer with a feature table which is a repeated table. I think the parameters are correct but when I click on &lt;STRONG&gt;T&lt;/STRONG&gt;&lt;STRONG&gt;est&lt;/STRONG&gt;&amp;nbsp;button, nothing appears. It doesn't load data. I get GlobalID from the main layer and ParentGlobalID from the feature table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var portal = Portal("https://www.arcgis.com/")
var mainfs = FeatureSetByPortalItem(portal,"365e0c417cd34bfdb06039c76715079e",0,["*"],false)
var tablefs = FeatureSetByPortalItem(portal,"365e0c417cd34bfdb06039c76715079e",1,["*"],false)

var joinedDict = {
  fields: [
    { name: "FeatureID", type: "esriFieldTypeGlobalID" },
    { name: "Grant", type: "esriFieldTypeString" },	
    { name: "HazardID", type: "esriFieldTypeString" },
    { name: "DTAreaCleared", type: "esriFieldTypeDouble" },
  ],
'geometryType': '',
'features':[]}

var i = 0;
for (var t in tablefs) {
    var tableID = t["ParentGlobalID"]
    var filt_mainfs = Filter(mainfs, "GlobalID = @tableID")
    for (var p in filt_mainfs){
        joinedDict.features[i] = {
            attributes: {
                FeatureID: tableID,
                Grant: p["Grant_Number"],
				HazardID: t["Hazard_ID"],
                DTAreaCleared: t["DT_Area_Cleared"],
            }
        }
    }
i++
}

//return dictionary
return FeatureSet(Text(joinedDict));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 06:50:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/having-trouble-with-joining-feature-layer-and/m-p/1135357#M5754</guid>
      <dc:creator>SayedWali</dc:creator>
      <dc:date>2022-01-25T06:50:28Z</dc:date>
    </item>
  </channel>
</rss>

