Summerize data within a repeat. Survey123

3902
11
01-30-2017 01:07 PM
BrentKinal1
Occasional Contributor III

Is there a way to pull all of the data from one field within a repeat to basically show a summary list. I have a form that is collecting  A site name and Data outside of a repeat and the collecting a species name and some related info inside a repeat and I would like to show a running list of the species names collected I was thinking in a note field, just not sure how to call the values?

Tags (1)
0 Kudos
11 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Brent,

We currently don't have functions that work across the values of a repeated field.  When we do, what you're wanting will be available via a function called join()

LynnBerni
Occasional Contributor II

Any chance this functionality has been added? I would like to add a note with a label that says "Transects entered thus far:", and a calculation that would simply list them separated by spaces.  

E.g.  Transects entered thus far:  A B D E G J K

Fingers crossed.

Thanks,
Lynn

0 Kudos
IsmaelChivite
Esri Notable Contributor

This may do the trick.

LynnBerni
Occasional Contributor II

Hi Ismael,

That worked! This gives me a simple list (eg. ABCDE) which works just fine in this case since the transect ID's are a single letter. For future reference, is there a way to add other characters (spaces, commas, etc.) between the values to make the list more legible? If these were anything other than a single digit, this wouldn't really work.

Thanks!

Lynn

0 Kudos
NicolasRoger
Occasional Contributor

I succeeded in listing the answers of a repeat in a comma delemitated string.

Here is how to do it:

In the repeat, create a Calculate field named "repeatTxt". Set it's "bind::type" to:

string

Set it's calculation to:

${yourRepeatQuestionName} + ', '

Now create a new Calculate field outside the reapeat called "sumTxt".

Set it's "bind::type" to:

string

Set it's calculation to:

sum(${repeatTxt})

Now Create a Note field and place this in the Label property:

${sumTxt}

I hope this help.

EDIT:

You can even add conditional color formatting to the repeat calculation to highlights errors!

DougBrowning
MVP Esteemed Contributor

This does work for me.  Thanks.

But why not use this function from the help?  I tried it but it is not working.  It only displays the value in the last repeat for some reason.

join(separator, question)
Concatenates all answers to a given question in a repeat, separated by the given separator.
join(',', ${question_in_repeat})

0 Kudos
NicolasRoger
Occasional Contributor

As far as I know, Join is not implement in Survey123.

0 Kudos
DougBrowning
MVP Esteemed Contributor

It actually is in there now I just need to go from Connect 3.0 to 3.2 and it worked great.

TKSHEP
by
New Contributor III

This worked great, however do you know if there is a way to get the repeat to show without the _ and use a , (comma) 

example :   last_first    display as last,first

Thank you!

0 Kudos