Select to view content in your preferred language

Summarize Repeat

620
5
11-15-2022 01:42 PM
MarcoPoetsch
Frequent Contributor

Hi all,

is there a way to summarize repeats at the end of a survey?
I'm not looking for a statistical summary, rather than summary based on a text field.

Basically, I have different conservation sites (drop down list) in a repeat that can be assessed in a single survey.

At the end of the survey I would like to have a summary of the sites (site names) that have been assessed, and ideally also those that haven't. In the most basic version it should be just saying if a site has been assessed or not. (Site A = assessed, Site B = Assessed, Site C = Not assessed)

What I have so far is a hidden calculation for each site in the repeat that checks if it is selected or not:

name calculation
SiteACheck...if(selected(${Site},'Site A'),1,0)
SiteBCheck...if(selected(${Site},'Site B'),1,0)
SiteCCheck...if(selected(${Site},'Site C'),1,0)



And at the end I have again for each site a field (note) that shows if a site got selected (if SiteXCheck = 1).

I'm sure there is better way to do this. Any ideas?

 

0 Kudos
5 Replies
DougBrowning
MVP Esteemed Contributor

Is it a count up for a total or just a yes no?  If you want a count then what you posted is the standard.

If you just want a yes or no then a join and a contains may do the trick.

You can also use a dashboard or arcade after the fact also.  I have been going this route more since we have users update data in the webmap, which skips the form, so none of the calcs update.  Watch out for that one.

Hope that helps

0 Kudos
MarcoPoetsch
Frequent Contributor

Thanks @DougBrowning,

It would be more a Yes/No or something similar.
Ideally, I would get in the end of the survey a list of sites that has not been assessed (via the repeats) in this survey.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Then try a join(repeatfield) outside the repeat then have if(contains(joinedField,something), yes, no)

MarcoPoetsch
Frequent Contributor

Yep, that should work. Thanks.


It's still not perfect. Especially regarding maintaining the survey. E.g. if a new site will be added in future.

I guess there is no calculation that looks into the choice list and lists those that hasn't been selected.

Maybe as a JS script. 🤔

MarcoPoetsch
Frequent Contributor

Or to get even more fancy, I could use the autocomplete search() for the repeatField which then gets summarized and checked against the same CSV/FS... Anyway, maybe I can do something using JS. I'll let you know.
I'll leave this for the moment as unanswered 😉

0 Kudos