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?
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()
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
This may do the trick.
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
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!
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})
As far as I know, Join is not implement in Survey123.
It actually is in there now I just need to go from Connect 3.0 to 3.2 and it worked great.
Sorry to resurrect an old thread, but is there a way to sort the data in a join summary. Im hoping to generate a list of numerical animal ID's that is sorted for easier reference