<?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 Data and Chart based on Login in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1395247#M9268</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/248874"&gt;@Nicole_Ueberschär&lt;/a&gt;&amp;nbsp;, glad you got it going with URL parameters. No, I don't have any experience with Web App Builder, when it comes to limiting content. You may look into whether it can support URL parameters as well, or see if shifting to Experience Builder is viable.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2024 14:18:20 GMT</pubDate>
    <dc:creator>PaulPetersen1</dc:creator>
    <dc:date>2024-03-13T14:18:20Z</dc:date>
    <item>
      <title>Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1262922#M7424</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Is there anyway to filter data and chart in dashboard (or experience builder) based on the user login? The idea is when user A login, the dashboard will only shown the user A data and he/she will not be able to see the data created by other user. The rule will be also applied to charts or widgets related to the data.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Naufal&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 07:56:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1262922#M7424</guid>
      <dc:creator>MuhammadNaufalIhsan</dc:creator>
      <dc:date>2023-03-01T07:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1262985#M7425</link>
      <description>&lt;P&gt;Yes, there is! It's a feature we make use of in some QC dashboards, making sure that users provide additional review to the work of others, but not themselves.&lt;/P&gt;&lt;P&gt;To get it to work, you need to use a Data Expression. In the Arcade expression, you'll have a chance to call the function &lt;STRONG&gt;GetUser&lt;/STRONG&gt;, and then use that to filter the data on the way in.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var curr_user = GetUser()['username']

var fs = FeatureSetByPortalItem(
    Portal('your portal url'),
    'itemid of the feature service',
    0, // or whatever the layer index is, if not 0
    ['*'],
    true
)

return Filter(fs, `created_user = '${curr_user}'`&lt;/LI-CODE&gt;&lt;P&gt;The data returned by this expression will be specific to the logged in user, and will apply to all widgets which reference the same data expression. Try it out!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 12:58:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1262985#M7425</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-03-01T12:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1263915#M7437</link>
      <description>&lt;P&gt;Hi Josh,&lt;BR /&gt;&lt;BR /&gt;Thank you! I will try it.&lt;/P&gt;&lt;P&gt;By the way, is there any way to filter it by group that the login user is a member in it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Naufal&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 08:20:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1263915#M7437</guid>
      <dc:creator>MuhammadNaufalIhsan</dc:creator>
      <dc:date>2023-03-03T08:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1263978#M7438</link>
      <description>&lt;P&gt;Yes, there is!&lt;/P&gt;&lt;P&gt;When you use the &lt;A href="https://developers.arcgis.com/arcade/function-reference/portal_functions/#getuser" target="_blank"&gt;GetUser&lt;/A&gt; function, the object that is returned has a number of properties, not just the username. One of them is an array of &lt;STRONG&gt;groups&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Each group in the array has its own values, too.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_0-1677853800659.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64279i50FAD152669081B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_0-1677853800659.png" alt="jcarlson_0-1677853800659.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How you use that list of groups and apply it to a filter depends on what you're wanting to do, but you could check the array for the presence of a certain group, or else just use the list of groups to filter by an attribute, etc.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 14:42:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1263978#M7438</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-03-03T14:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1264604#M7444</link>
      <description>&lt;P&gt;It works! Thanks a lot!&lt;BR /&gt;&lt;BR /&gt;Although, getting group info from the array is quite tricky. But so far it works, so thank you again!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Naufal&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 17:22:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1264604#M7444</guid>
      <dc:creator>MuhammadNaufalIhsan</dc:creator>
      <dc:date>2023-03-06T17:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1280621#M7653</link>
      <description>&lt;P&gt;Is there a way to do this in Experience Builder using the chart widget? I do not see an option to add in an Arcade expression anywhere when using the chart widget in Experience Builder.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 04:41:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1280621#M7653</guid>
      <dc:creator>Tweed_ShireAdmin</dc:creator>
      <dc:date>2023-04-20T04:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1376037#M9002</link>
      <description>&lt;P&gt;Unfortunately &lt;A title="Allow Arcade Expressions in Experience Builder" href="https://community.esri.com/t5/arcgis-experience-builder-ideas/allow-arcade-expressions-in-experience-builder/idi-p/939727" target="_blank" rel="noopener"&gt;not yet&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 18:24:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1376037#M9002</guid>
      <dc:creator>OlivieroVitale</dc:creator>
      <dc:date>2024-01-30T18:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1385441#M9117</link>
      <description>&lt;P&gt;We have been looking for this forever, thank you! Unfortunately I can't make it work, it keeps telling me that it's "unable to execute the Arcade script" although the test result is exactly as expected. I was further wondering how I can make this apply to the content of my map? Maybe it is so obvious that I don't see it...&lt;/P&gt;&lt;P&gt;Edit: I can make it work in ArcGIS Online but unfortunately not in Enterprise 11.1 and the way I see it work for the map content would be to use a selector with the filtered expression and not to put the none option so it automatically filters to that selection.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 06:11:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1385441#M9117</guid>
      <dc:creator>Nicole_Ueberschär</dc:creator>
      <dc:date>2024-02-23T06:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1392045#M9222</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/248874"&gt;@Nicole_Ueberschär&lt;/a&gt;&amp;nbsp;, we are having the same issue with Portal 11.1. Did you ever find a resolution or workaround?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 18:32:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1392045#M9222</guid>
      <dc:creator>PaulPetersen1</dc:creator>
      <dc:date>2024-03-06T18:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1392086#M9223</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/88758"&gt;@PaulPetersen1&lt;/a&gt; , Unfortunately I couldn't make it work in Portal 11.1.&lt;/P&gt;&lt;P&gt;I found in the developer console that there seems to be an issue around that it doesn't recognize the result as a featureset:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;error predictOutputType: "Analysis not supported"
script: Write an expression that returns a FeatureSet.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I don't see though why the result of the expression is not be a featureset when the test inside the Arcade expression is successful.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I am also still looking for a better way of filtering the map content itself (in 11.2 now). It works well if we have only one district for example looking at the data for that district. But if we filter on Province level (one level up) then that person is supposed to see 7 districts and with the current options I found, he will only be able to see one district when loading the dashboard. I have been breaking my brain over trying to find a way to show all 7 districts but only those 7 districts... It is ok as long as we have have only users on the same level but not from different levels &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 19:48:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1392086#M9223</guid>
      <dc:creator>Nicole_Ueberschär</dc:creator>
      <dc:date>2024-03-06T19:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1392150#M9227</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/248874"&gt;@Nicole_Ueberschär&lt;/a&gt;&amp;nbsp;, just a little bit after making my first post, we figured out how to get it to work. Turns out that the getUser() function was somehow causing the issue (even though the Test would work). After tweaking the function a bit, it now works. See below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var port = Portal('https://xxxx.com/portal');
var fs = FeatureSetByPortalItem(
    port,
    'xxxxxxxxxxxxxxxxxx',
    0,
    [
        'Inspector'
    ],
    false
);
Console(Count(fs)) // to get number of features in feature service in Console
 
var u = getUser(port);
var fullName = u.username;
Console (fullname) // to check in the Console that the fullname is returned
 
var filfs = Filter(fs, `Inspector= '${fullname}'`) // change field as needed
Console(Count(filfs)) // check in Console that it is returning the correct number of features assigned to the user
return filfs&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 21:06:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1392150#M9227</guid>
      <dc:creator>PaulPetersen1</dc:creator>
      <dc:date>2024-03-06T21:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1392454#M9232</link>
      <description>&lt;P&gt;Thanks a lot for this &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/88758"&gt;@PaulPetersen1&lt;/a&gt; ! What difference the case of a letter can make! &lt;span class="lia-unicode-emoji" title=":astonished_face:"&gt;😲&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any idea what to do about the map content?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 12:42:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1392454#M9232</guid>
      <dc:creator>Nicole_Ueberschär</dc:creator>
      <dc:date>2024-03-07T12:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1392571#M9236</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/248874"&gt;@Nicole_Ueberschär&lt;/a&gt;&amp;nbsp;, no not sure about the map content. If you don't have tons of users or groups, you could perhaps try something with hosted views with separate group permissions and filters...handle it there rather than in the dashboard. I've also had success in solving "filter puzzles" by using the NOT operator rather than Equals and coming at things from the opposite angle. Probably not helpful for your situation.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 15:04:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1392571#M9236</guid>
      <dc:creator>PaulPetersen1</dc:creator>
      <dc:date>2024-03-07T15:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1395134#M9267</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/88758"&gt;@PaulPetersen1&lt;/a&gt;&amp;nbsp;, we managed to do it using the url parameter option from the dashboard and then embed it into an application in which we use javascript to create the url based on the signed in user.&lt;/P&gt;&lt;P&gt;Now I am having the same problem with limiting the content in a Web Appbuilder application. Any idea ? Using views is just not feasible for 30+ users &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 09:03:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1395134#M9267</guid>
      <dc:creator>Nicole_Ueberschär</dc:creator>
      <dc:date>2024-03-13T09:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1395247#M9268</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/248874"&gt;@Nicole_Ueberschär&lt;/a&gt;&amp;nbsp;, glad you got it going with URL parameters. No, I don't have any experience with Web App Builder, when it comes to limiting content. You may look into whether it can support URL parameters as well, or see if shifting to Experience Builder is viable.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 14:18:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1395247#M9268</guid>
      <dc:creator>PaulPetersen1</dc:creator>
      <dc:date>2024-03-13T14:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data and Chart based on Login</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1545132#M10354</link>
      <description>&lt;P&gt;Does anyone know if this is possible in Experience Builder?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 11:44:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-data-and-chart-based-on-login/m-p/1545132#M10354</guid>
      <dc:creator>YobaniMaldonado</dc:creator>
      <dc:date>2024-10-03T11:44:22Z</dc:date>
    </item>
  </channel>
</rss>

