Show distinct values in a list widget based on filters in selector widgets

09-15-2021 10:56 PM
Labels (1)
New Contributor III

Hi all

I'm wanting to use a list widget to display a list of unique species, and to filter that list based on up to 3 different selectors - REGION_A, REGION_B and SPECIES_TYPE

Ideally, I'm looking for a 'distinct values' option within the list widget (similar to what is available in an indicator widget) - but I understand this isn't available.  Without it, the list contains duplicate species names.  Example below.


Which leaves me in workaround territory!  I have attempted to use a data expression with a GroupBy function  (based on this post Introducing Data Expressions in ArcGIS Dashboards (, which successfully removes duplicates but can't be linked to the selector widgets (i.e. because the returned featureset doesn't include the fields used by the selector widget).  If I include these fields in the featureset, it no longer provides me with distinct values!

var fs = FeatureSetByPortalItem(Portal(''), 'xxxxxxxxxxxx', 0, ['SPECIES','COMNAME','FREQUENCY']);
// Return a featureset with multiple group by statistics.  
return GroupBy(fs, ['SPECIES','COMNAME'], { name: 'NumRecords', expression: 'FREQUENCY', statistic: 'SUM' });

Has anyone found a successful workaround that provides unique values in a list widget and can be used with selector widgets?

2 Replies
New Contributor II

Hi, did you ever find a solution to this?

0 Kudos
New Contributor III

Unfortunately not - we ended up having to exclude this functionality from our dashboard until a time when it becomes available

0 Kudos