<?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: Filter widgets/ Pages based on login in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/filter-widgets-pages-based-on-login/m-p/1526824#M14489</link>
    <description>&lt;P&gt;Good Question, Even i to want to know this workflow?&lt;/P&gt;</description>
    <pubDate>Sun, 25 Aug 2024 07:57:06 GMT</pubDate>
    <dc:creator>AbdulabnanMohammed</dc:creator>
    <dc:date>2024-08-25T07:57:06Z</dc:date>
    <item>
      <title>Filter widgets/ Pages based on login</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/filter-widgets-pages-based-on-login/m-p/1526823#M14488</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create an experience builder app and I want to filter the widgets/ pages within this app based on the login. So, I will create two groups, and the members of each group will have a different view of the same app. Is that something I can achieve with Arcade/Javascript?&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2024 07:11:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/filter-widgets-pages-based-on-login/m-p/1526823#M14488</guid>
      <dc:creator>AJD</dc:creator>
      <dc:date>2024-08-25T07:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Filter widgets/ Pages based on login</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/filter-widgets-pages-based-on-login/m-p/1526824#M14489</link>
      <description>&lt;P&gt;Good Question, Even i to want to know this workflow?&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2024 07:57:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/filter-widgets-pages-based-on-login/m-p/1526824#M14489</guid>
      <dc:creator>AbdulabnanMohammed</dc:creator>
      <dc:date>2024-08-25T07:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Filter widgets/ Pages based on login</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/filter-widgets-pages-based-on-login/m-p/1533849#M14656</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/706467"&gt;@AbdulabnanMohammed&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used ChatGPT to find the answer,&lt;/P&gt;&lt;P&gt;use this arcade expression on your layer when adding it as a data source for the widget:&lt;/P&gt;&lt;P&gt;// Get the current user's username&lt;BR /&gt;var curr_user = GetUser()['username'];&lt;/P&gt;&lt;P&gt;// Create a feature set from the specified portal item&lt;BR /&gt;var fs = FeatureSetByPortalItem(&lt;BR /&gt;Portal("&lt;A href="https://www.arcgis.com" target="_blank"&gt;https://www.arcgis.com&lt;/A&gt;"),&lt;BR /&gt;"ITEM ID(Replce this part with the ITEM ID",&lt;BR /&gt;0, // Layer index&lt;BR /&gt;["*"], // Select all fields&lt;BR /&gt;false // Exclude geometry&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;// Filter the feature set by the current user's username&lt;BR /&gt;return Filter(fs, `Creator = '${curr_user}'`);&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2024 11:56:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/filter-widgets-pages-based-on-login/m-p/1533849#M14656</guid>
      <dc:creator>AJD</dc:creator>
      <dc:date>2024-09-01T11:56:03Z</dc:date>
    </item>
  </channel>
</rss>

