I am looking to create a list only showing the unique values from a layer. The example is below.
Original Table Example
I want the list to only read Applicant 1 and Applicant 2. Not list them multiple times which is how the list currently works. My goal is to select applicant 1 and see various charts associated with that applicant.
I appreciate any guidance you have.
Kelly
Hi Kelly,
Which product are you working on, and is it just an attribute table?
In your case, each combination of the [Name, Type] is actually unique.
If in ArcGIS Dashboards, you will want to "group by" the name column, then you can get unique "applicants" with their grouped values such as total number of types per applicant. If using Arcade, there is a "GroupBy" function you can use. If dealing with ArcGIS Server Rest Endpoint, "returnDistinctValues" is a parameter you may be interested in (Query (Feature Service/Layer)—ArcGIS REST APIs | ArcGIS Developers).
Cheers,
Anbin
Hello,
Thank you for your reply. I am trying to do this in experience builder, not a dashboard. And am trying to do this in a list. I am using a hosted table on ArcGIS online. Thank you for any additional assistance you can provide. .
Kelly
Hi @anbinh ,
I am trying to update the layer definition for a view layer I created from a hosted AGOL feature layer as a work around fro the lack of a Groupby option in Experience Builder.
I have the following information included and it seems successful in theory but the view layer data table still shows all of the records. I have tried to just query the REST endpoint and I see the info correctly summarized there. The view layer is a point layer and really I just want the nonspatial (no geometry) returned so I can use this as a datasource in an EB list widget. Is this possible or do you see an reason the below isn't working? I very seldom use this workflow.
When I click to Update Definition the below processes as complete or updated, but all the records are still in the Data table of the hosted feature layer as they were originally.
Thanks in advance,
Kathy
Any updates on this? I am trying to do the exact same thing on Experience Builder and I can't find a way...
Hi!,
I am also trying to summarize or get unique values summarized (GroupBy) have people been able to accomplish this in EB? I was going to try the Query the ArcGIS Server Rest Endpoint, "returnDistinctValues" suggested by @anbinh , but I would rather use something like GroupBy as in dashboards if available. That said even after the November 2024 update I'm not seeing this option. Thanks!
Hi @kstone_ntia ,
In the June 2025 AGOL release, you can add data via an Arcade script. You can create an Arcade script that returns only the unique applicant name and uses the message action Record selection changes to display the associated records of the original data.
Hope it helps,
Shengdi
Hi,
Any thoughts on what I may be doing wrong/missing? This seemed like it would solve my exact problem (I wanted to show users a table of unique values from a FeatureSet). I took the complete feature set, filtered down to the unique values (2 of 122), and it all looked good:
But when I plugged my Arcade data script into a table, I got all records instead of my filtered set:
Hi @JohnEvans6 ,
I add a filter in my script and it looks good in the table widget. Could you share your data and script with me?
Thanks,
Shengdi
Happy to thanks for looking. Should be pretty straightforward:
var fieldName = "IWL_NAME";
var features = FeatureSetByPortalItem(Portal("https://faasysops.maps.arcgis.com/"), '8abc49df0f9247b9abd7b62eaa37952d', 0)
var uniqueIds = GroupBy(features, [fieldName], { name: "f_objID", expression: "OBJECTID", statistic: "FIRST" });
var unique_list = [];
for (var id in uniqueIds) {Push(unique_list, id.f_objID)}
var sql = "OBJECTID IN (" + Concatenate(unique_list, ", ") + ")";
return Filter(features, sql);
As above the feature set is filtered down to 2 records, which I want to display in the table behind in the screenshot. I figured the table would just load the 2 records in the output, but it loads them all.