<?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 Data Expression or Filter in Dashboard Based on User in Related Table in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/data-expression-or-filter-in-dashboard-based-on/m-p/1622779#M65052</link>
    <description>&lt;P&gt;I'm wondering if it's possible to filter a featureset based on a filtered related table? Essentially I am trying to create a data expression that only returns features relevant to the logged in user. I can pull the name for the logged in user, and I can filter the related table so I have a list of correct parent IDs, but I'm trying to figure out how to then filter the parent hosted feature layer to only include features that match the list of correct parent IDs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Including a diagram to explain better:&lt;/P&gt;&lt;P&gt;1) I get the logged in user's name, let's say it's "Amy" in the screenshot&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fs = FeatureSetByPortalItem(portal, '8e437a67551e4acab0487bcde4dc2c8c',0,["objectid","globalid","project_name","project_id"])
var fs_2 = FeatureSetByPortalItem(portal, '8e437a67551e4acab0487bcde4dc2c8c',1,["objectid","globalid","parent_project_id_pt","team_member_name"])
var curr_user = GetUser(portal)['fullName']&lt;/LI-CODE&gt;&lt;P&gt;2) I filter the Related Table to only include features that match "Amy" (in the screenshot)&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fsFiltered = Filter(fs_2, "team_member_name = @curr_user")&lt;/LI-CODE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;3) How do I use arcade in data expressions/dashboards to return the featureset filtered to only include "Project 1" and "Project 3", since those are the only ones that have Amy matched in the related table?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GIS_utahDEM_1-1749664194285.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/134229i3BF15AC19E30DD1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GIS_utahDEM_1-1749664194285.png" alt="GIS_utahDEM_1-1749664194285.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jun 2025 17:56:40 GMT</pubDate>
    <dc:creator>GIS_utahDEM</dc:creator>
    <dc:date>2025-06-11T17:56:40Z</dc:date>
    <item>
      <title>Data Expression or Filter in Dashboard Based on User in Related Table</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/data-expression-or-filter-in-dashboard-based-on/m-p/1622779#M65052</link>
      <description>&lt;P&gt;I'm wondering if it's possible to filter a featureset based on a filtered related table? Essentially I am trying to create a data expression that only returns features relevant to the logged in user. I can pull the name for the logged in user, and I can filter the related table so I have a list of correct parent IDs, but I'm trying to figure out how to then filter the parent hosted feature layer to only include features that match the list of correct parent IDs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Including a diagram to explain better:&lt;/P&gt;&lt;P&gt;1) I get the logged in user's name, let's say it's "Amy" in the screenshot&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fs = FeatureSetByPortalItem(portal, '8e437a67551e4acab0487bcde4dc2c8c',0,["objectid","globalid","project_name","project_id"])
var fs_2 = FeatureSetByPortalItem(portal, '8e437a67551e4acab0487bcde4dc2c8c',1,["objectid","globalid","parent_project_id_pt","team_member_name"])
var curr_user = GetUser(portal)['fullName']&lt;/LI-CODE&gt;&lt;P&gt;2) I filter the Related Table to only include features that match "Amy" (in the screenshot)&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fsFiltered = Filter(fs_2, "team_member_name = @curr_user")&lt;/LI-CODE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;3) How do I use arcade in data expressions/dashboards to return the featureset filtered to only include "Project 1" and "Project 3", since those are the only ones that have Amy matched in the related table?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GIS_utahDEM_1-1749664194285.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/134229i3BF15AC19E30DD1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GIS_utahDEM_1-1749664194285.png" alt="GIS_utahDEM_1-1749664194285.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 17:56:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/data-expression-or-filter-in-dashboard-based-on/m-p/1622779#M65052</guid>
      <dc:creator>GIS_utahDEM</dc:creator>
      <dc:date>2025-06-11T17:56:40Z</dc:date>
    </item>
  </channel>
</rss>

