Hello,
I am trying to accomplish separating my concatenated repeats on a new line in the Survey123 Web App. I am able to accomplish this in Survey123 Connect using "\n" however not able to replicate it in Web App. I have tried "\n" and <br> both with no success.
Solved! Go to Solution.
Why does the text need to be formatted in the form that way? There are lots of ways that you can redisplay responses in other formats like map popups and dashboards.
If it needs to be in the form, try using a custom JS function in your form, as this will allow you to reshape and combine strings with a lot more flexibility than the built in S123 functions.
Why does the text need to be formatted in the form that way? There are lots of ways that you can redisplay responses in other formats like map popups and dashboards.
If it needs to be in the form, try using a custom JS function in your form, as this will allow you to reshape and combine strings with a lot more flexibility than the built in S123 functions.
Hi Josh,
Thanks for this recommendation. I am not an expert with javascript by any means and was hoping you could help me tweak this code to produce the expected results. Currently I'm seeing the fields referenced as undefined and the line break not working.
Could it be this functionality is not available in the web app?
Extending Survey123 with Javacript
Starting with ArcGIS Survey123 version 3.10, you can incorporate logic in your forms using custom JavaScript (JS) functions.
Here is the code:
// In your form field "bds_comm_concat",
// use pulldata("@javascript","notes.js","getCommSummary",${bds_lead_communication})
function getCommSummary(rows) {
var commSummary = "";
for (var i = 0; i < rows.length; i++) {
commSummary +=
rows[i].bds_comm_date_text +
", " +
rows[i].bds_comm_user +
", " +
rows[i].bds_comm_method +
":<br>" +
rows[i].bds_comm_summary +
"<br>";
}
return commSummary;
}