<?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 Joining a hosted layer and a table in AGO for a dashboard in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/joining-a-hosted-layer-and-a-table-in-ago-for-a/m-p/1682747#M11789</link>
    <description>&lt;P&gt;Hi all -&lt;/P&gt;&lt;P&gt;I am trying to build a dashboard list widget use a layer and a table join. I used the following expression and was able to get the data I wanted but I keep getting a "cannot access data" yellow triangle in the corner of the widget. All sharing is set to "everyone" with groups on. Has anyone else run into this issue before??&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nallen_21_0-1770393607466.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/148053i8F3D3791A1F19E28/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nallen_21_0-1770393607466.png" alt="Nallen_21_0-1770393607466.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Portal and ID's have been removed.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;// Dashboards Data Expression (DETAIL)&lt;BR /&gt;// FULL OUTER JOIN (robust)&lt;BR /&gt;// Key: Projects.REL_OBJECTID ↔ Citywide.REL_OBJECTID&lt;/P&gt;&lt;P&gt;var p = Portal("");&lt;/P&gt;&lt;P&gt;var projects = FeatureSetByPortalItem(&lt;BR /&gt;p, "", 0,&lt;BR /&gt;["REL_OBJECTID","CIPName","PWAType"], false&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;var citywide = FeatureSetByPortalItem(&lt;BR /&gt;p, "", 0,&lt;BR /&gt;["OBJECTID","REL_OBJECTID","CIPName","PWAType"], false&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;function k(v){ return Text(DefaultValue(v,"")); }&lt;BR /&gt;function s(v){ return Text(DefaultValue(v,"")); }&lt;BR /&gt;function pref(a,b){ return IIF(!IsEmpty(a), a, b); }&lt;/P&gt;&lt;P&gt;// Lookup: REL_OBJECTID -&amp;gt; {CIPName, PWAType} (simple values only)&lt;BR /&gt;var prjByRel = Dictionary();&lt;BR /&gt;for (var pr in projects) {&lt;BR /&gt;var kk = k(pr["REL_OBJECTID"]);&lt;BR /&gt;if (IsEmpty(kk)) continue;&lt;/P&gt;&lt;P&gt;prjByRel[kk] = {&lt;BR /&gt;CIPName: s(pr["CIPName"]),&lt;BR /&gt;PWAType: s(pr["PWAType"])&lt;BR /&gt;};&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// Track Citywide keys so we can emit unmatched projects&lt;BR /&gt;var cwKeys = Dictionary();&lt;BR /&gt;for (var cw0 in citywide) {&lt;BR /&gt;var kk2 = k(cw0["REL_OBJECTID"]);&lt;BR /&gt;if (!IsEmpty(kk2)) cwKeys[kk2] = 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var features = [];&lt;BR /&gt;var oid = 1;&lt;/P&gt;&lt;P&gt;// 1) All Citywide rows&lt;BR /&gt;for (var cw in citywide) {&lt;/P&gt;&lt;P&gt;var relKey = k(cw["REL_OBJECTID"]);&lt;BR /&gt;var hasPrj = (!IsEmpty(relKey) &amp;amp;&amp;amp; HasKey(prjByRel, relKey));&lt;BR /&gt;var prA = IIF(hasPrj, prjByRel[relKey], Null);&lt;/P&gt;&lt;P&gt;var cwName = s(cw["CIPName"]);&lt;BR /&gt;var cwType = s(cw["PWAType"]);&lt;BR /&gt;var prName = IIF(hasPrj, prA["CIPName"], "");&lt;BR /&gt;var prType = IIF(hasPrj, prA["PWAType"], "");&lt;/P&gt;&lt;P&gt;Push(features, { attributes: {&lt;BR /&gt;OID: oid,&lt;BR /&gt;REL_OBJECTID: DefaultValue(cw["REL_OBJECTID"], Null),&lt;BR /&gt;CitywideOID: DefaultValue(cw["OBJECTID"], Null),&lt;BR /&gt;CIPName: pref(cwName, prName),&lt;BR /&gt;PWAType: pref(cwType, prType),&lt;BR /&gt;HasProject: IIF(hasPrj, 1, 0),&lt;BR /&gt;HasCitywide: 1&lt;BR /&gt;}});&lt;/P&gt;&lt;P&gt;oid++;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// 2) Projects with no Citywide rows&lt;BR /&gt;for (var pr2 in projects) {&lt;/P&gt;&lt;P&gt;var relKey2 = k(pr2["REL_OBJECTID"]);&lt;BR /&gt;if (!IsEmpty(relKey2) &amp;amp;&amp;amp; HasKey(cwKeys, relKey2)) continue;&lt;/P&gt;&lt;P&gt;Push(features, { attributes: {&lt;BR /&gt;OID: oid,&lt;BR /&gt;REL_OBJECTID: DefaultValue(pr2["REL_OBJECTID"], Null),&lt;BR /&gt;CitywideOID: Null,&lt;BR /&gt;CIPName: s(pr2["CIPName"]),&lt;BR /&gt;PWAType: s(pr2["PWAType"]),&lt;BR /&gt;HasProject: 1,&lt;BR /&gt;HasCitywide: 0&lt;BR /&gt;}});&lt;/P&gt;&lt;P&gt;oid++;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return FeatureSet({&lt;BR /&gt;fields: [&lt;BR /&gt;{ name:"OID", type:"esriFieldTypeOID" },&lt;BR /&gt;{ name:"REL_OBJECTID", type:"esriFieldTypeInteger" },&lt;BR /&gt;{ name:"CitywideOID", type:"esriFieldTypeInteger" },&lt;BR /&gt;{ name:"CIPName", type:"esriFieldTypeString" },&lt;BR /&gt;{ name:"PWAType", type:"esriFieldTypeString" },&lt;BR /&gt;{ name:"HasProject", type:"esriFieldTypeInteger" },&lt;BR /&gt;{ name:"HasCitywide", type:"esriFieldTypeInteger" }&lt;BR /&gt;],&lt;BR /&gt;geometryType: "",&lt;BR /&gt;features: features&lt;BR /&gt;});&lt;/P&gt;</description>
    <pubDate>Fri, 06 Feb 2026 16:09:28 GMT</pubDate>
    <dc:creator>Nallen_21</dc:creator>
    <dc:date>2026-02-06T16:09:28Z</dc:date>
    <item>
      <title>Joining a hosted layer and a table in AGO for a dashboard</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/joining-a-hosted-layer-and-a-table-in-ago-for-a/m-p/1682747#M11789</link>
      <description>&lt;P&gt;Hi all -&lt;/P&gt;&lt;P&gt;I am trying to build a dashboard list widget use a layer and a table join. I used the following expression and was able to get the data I wanted but I keep getting a "cannot access data" yellow triangle in the corner of the widget. All sharing is set to "everyone" with groups on. Has anyone else run into this issue before??&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nallen_21_0-1770393607466.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/148053i8F3D3791A1F19E28/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nallen_21_0-1770393607466.png" alt="Nallen_21_0-1770393607466.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Portal and ID's have been removed.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;// Dashboards Data Expression (DETAIL)&lt;BR /&gt;// FULL OUTER JOIN (robust)&lt;BR /&gt;// Key: Projects.REL_OBJECTID ↔ Citywide.REL_OBJECTID&lt;/P&gt;&lt;P&gt;var p = Portal("");&lt;/P&gt;&lt;P&gt;var projects = FeatureSetByPortalItem(&lt;BR /&gt;p, "", 0,&lt;BR /&gt;["REL_OBJECTID","CIPName","PWAType"], false&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;var citywide = FeatureSetByPortalItem(&lt;BR /&gt;p, "", 0,&lt;BR /&gt;["OBJECTID","REL_OBJECTID","CIPName","PWAType"], false&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;function k(v){ return Text(DefaultValue(v,"")); }&lt;BR /&gt;function s(v){ return Text(DefaultValue(v,"")); }&lt;BR /&gt;function pref(a,b){ return IIF(!IsEmpty(a), a, b); }&lt;/P&gt;&lt;P&gt;// Lookup: REL_OBJECTID -&amp;gt; {CIPName, PWAType} (simple values only)&lt;BR /&gt;var prjByRel = Dictionary();&lt;BR /&gt;for (var pr in projects) {&lt;BR /&gt;var kk = k(pr["REL_OBJECTID"]);&lt;BR /&gt;if (IsEmpty(kk)) continue;&lt;/P&gt;&lt;P&gt;prjByRel[kk] = {&lt;BR /&gt;CIPName: s(pr["CIPName"]),&lt;BR /&gt;PWAType: s(pr["PWAType"])&lt;BR /&gt;};&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// Track Citywide keys so we can emit unmatched projects&lt;BR /&gt;var cwKeys = Dictionary();&lt;BR /&gt;for (var cw0 in citywide) {&lt;BR /&gt;var kk2 = k(cw0["REL_OBJECTID"]);&lt;BR /&gt;if (!IsEmpty(kk2)) cwKeys[kk2] = 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var features = [];&lt;BR /&gt;var oid = 1;&lt;/P&gt;&lt;P&gt;// 1) All Citywide rows&lt;BR /&gt;for (var cw in citywide) {&lt;/P&gt;&lt;P&gt;var relKey = k(cw["REL_OBJECTID"]);&lt;BR /&gt;var hasPrj = (!IsEmpty(relKey) &amp;amp;&amp;amp; HasKey(prjByRel, relKey));&lt;BR /&gt;var prA = IIF(hasPrj, prjByRel[relKey], Null);&lt;/P&gt;&lt;P&gt;var cwName = s(cw["CIPName"]);&lt;BR /&gt;var cwType = s(cw["PWAType"]);&lt;BR /&gt;var prName = IIF(hasPrj, prA["CIPName"], "");&lt;BR /&gt;var prType = IIF(hasPrj, prA["PWAType"], "");&lt;/P&gt;&lt;P&gt;Push(features, { attributes: {&lt;BR /&gt;OID: oid,&lt;BR /&gt;REL_OBJECTID: DefaultValue(cw["REL_OBJECTID"], Null),&lt;BR /&gt;CitywideOID: DefaultValue(cw["OBJECTID"], Null),&lt;BR /&gt;CIPName: pref(cwName, prName),&lt;BR /&gt;PWAType: pref(cwType, prType),&lt;BR /&gt;HasProject: IIF(hasPrj, 1, 0),&lt;BR /&gt;HasCitywide: 1&lt;BR /&gt;}});&lt;/P&gt;&lt;P&gt;oid++;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// 2) Projects with no Citywide rows&lt;BR /&gt;for (var pr2 in projects) {&lt;/P&gt;&lt;P&gt;var relKey2 = k(pr2["REL_OBJECTID"]);&lt;BR /&gt;if (!IsEmpty(relKey2) &amp;amp;&amp;amp; HasKey(cwKeys, relKey2)) continue;&lt;/P&gt;&lt;P&gt;Push(features, { attributes: {&lt;BR /&gt;OID: oid,&lt;BR /&gt;REL_OBJECTID: DefaultValue(pr2["REL_OBJECTID"], Null),&lt;BR /&gt;CitywideOID: Null,&lt;BR /&gt;CIPName: s(pr2["CIPName"]),&lt;BR /&gt;PWAType: s(pr2["PWAType"]),&lt;BR /&gt;HasProject: 1,&lt;BR /&gt;HasCitywide: 0&lt;BR /&gt;}});&lt;/P&gt;&lt;P&gt;oid++;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return FeatureSet({&lt;BR /&gt;fields: [&lt;BR /&gt;{ name:"OID", type:"esriFieldTypeOID" },&lt;BR /&gt;{ name:"REL_OBJECTID", type:"esriFieldTypeInteger" },&lt;BR /&gt;{ name:"CitywideOID", type:"esriFieldTypeInteger" },&lt;BR /&gt;{ name:"CIPName", type:"esriFieldTypeString" },&lt;BR /&gt;{ name:"PWAType", type:"esriFieldTypeString" },&lt;BR /&gt;{ name:"HasProject", type:"esriFieldTypeInteger" },&lt;BR /&gt;{ name:"HasCitywide", type:"esriFieldTypeInteger" }&lt;BR /&gt;],&lt;BR /&gt;geometryType: "",&lt;BR /&gt;features: features&lt;BR /&gt;});&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 16:09:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/joining-a-hosted-layer-and-a-table-in-ago-for-a/m-p/1682747#M11789</guid>
      <dc:creator>Nallen_21</dc:creator>
      <dc:date>2026-02-06T16:09:28Z</dc:date>
    </item>
  </channel>
</rss>

