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

1570
3
09-15-2021 10:56 PM
Labels (1)
BlairPellegrino
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.

BlairPellegrino_0-1631771302094.png

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 (esri.com)), 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('https://xxx.arcgis.com/'), '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?

3 Replies
YvanS
by
New Contributor II

Hi, did you ever find a solution to this?

0 Kudos
BlairPellegrino
New Contributor III

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

YvanS
by
New Contributor II

Thanks.

I asked a similar question here: https://community.esri.com/t5/arcgis-dashboards-questions/arcade-in-list-advanced-formatting-filter-... and here https://gis.stackexchange.com/questions/464487/esri-dashboard-arcade-in-list-advanced-formatting-fil... but didn't get a working answer.

I can't believe more people aren't having this issue and not finding solutions...

0 Kudos