join answers from repeat in outside note

535
4
12-19-2019 02:15 PM
MilesMcCoy-Sulentic
New Contributor II

Is it possible to incorporate a new line/line break into a join calculation for a note or text type in survey123? I believe my question is similar to Counting "unique" selections across repeats. I'm hoping to create a summary list of all species at a site that were recorded in the repeat and what percent cover value was assigned to each species in a vertical list format, rather than one continuous string. Two questions inside the repeat are "species", and "cover"; my thought was to join the species and cover fields, and create a new line for the next pair responses. I played around with <br> and \n and multiline appearance but I wasn't able to figure anything out. 

Thanks

Reply
0 Kudos
4 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Miles,

What are you trying to view the list in?  \n would be appropriate for text output.

Reply
0 Kudos
MilesMcCoy-Sulentic
New Contributor II

Hi James,

I was able to get \n working, and it appears to work for both note and text outputs. I think my attempts at concatenating questions from the repeat in the note were also causing an issue. Is it possible to concatenate multiple questions from a repeat inside of a join calculation (something like: join(',\n',concat(${species},${aacover})) - though this doesn't work)?

My goal was a summary table for the data in the repeat but I understand that's in the works? Way to summarize existing items inside a repeat? For plant surveys it's nice to have the whole list visible at once when reviewing it in the field to finalize things.

My work around was to create a group of notes to summarize each individual questions in the repeat  

Reply
0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Miles,

the join() is designed to concatenate the values from 1 question in a repeat - the concatenate wouldn't be appropriate. The GeoNet post you linked mentioned an enhancement of having a tabular view of repeats; as mentioned there, I logged that as a potential enhancement but it is not currently in Survey123's roadmap.  

In terms of creating a summary table, there is work being planned to provide this functionality within the feature report system (to provide this as output).  If it is needed in the form, it could possibly be done through a series of hidden questions that create 'bins' for each species that then get summed, with the results being concatenated together into a table; it also could be done via a beta feature (custom JS functions) that could process the repeat and generate the table a bit more efficiently.

ChaimSchwartz4
Occasional Contributor

Hello Miles McCoy-Sulentic‌ - any chance you can share with me how you broke the lines using \n? it doesn't seem to work for me. Thanks

Reply
0 Kudos