Applying functionality similar to 'Distinct' on Dashboard List

759
1
06-24-2021 10:07 PM
JulietK
Occasional Contributor II

Hi, I have a survey which contains a repeat. 

For example, my survey records the worker name, location, date and bird types found during a field work. Since the worker can find multiple bird species during one field work round, this section is inside a repeat. One survey submission is one field round.

To allow a dashboard to be created from this, the values from the worker name, location and date fields are also copied into hidden fields within the repeat. This repeat layer is the source of the dashboard.

I am having an issue here - in my indicators counting the number of field work rounds, I can use the 'Distinct' button coupled with 'Field' set to ParentGlobalID, to only count the survey submissions, rather than the count including each of the repeats.

JulietK_0-1624597127466.jpeg

The issue is with showing the data on a List, since the List doesnt offer the 'Distinct' button option. The way the survey is set up originally, each of the list details show one row from the repeat layer, so if a worker found 3 bird species, these will show as 3 separate parts on the list. For example, these will show as:

-------------------------------------------------------------

Worker1 | Location1 | Date1 | Birdspecies 1

-------------------------------------------------------------

Worker1 | Location1 | Date1 | Birdspecies 2

-------------------------------------------------------------

Worker1 | Location1 | Date1 | Birdspecies 3

-------------------------------------------------------------

But I want to have one row for each submission, with the 3 bird species named together inside one row, like below.

-------------------------------------------------------------

Worker1 | Location1 | Date1 | Birdspecies 1,  Birdspecies2, Birdspecies 3

-------------------------------------------------------------

Even if I create a new field with a join() for the bird species names (and copy this into repeat layer) and use this join field in the List, this won't achieve what I'd like on the List since it will still show 3 rows of the above. For many reasons, the Dashboard needs to reference the repeat layer, and not the parent layer.

Any ideas would be greatly appreciated! 🙂

1 Reply
BenjaminBlackshear
New Contributor III

I think you will need to use a data expression to restructure your data to achieve this: https://www.esri.com/arcgis-blog/products/ops-dashboard/announcements/introducing-data-expressions-i...

this example looks somewhat similar to what you are looking for: https://community.esri.com/t5/arcgis-online-questions/concatenate-fields-in-dashboard-data-expressio...

 

0 Kudos