I'm wondering why my custom JS function to concatenate attributes of a repeat is working when I test in survey123 connect, but does not work when I open in the web app. I am attaching my function, as well as screenshots of the connect example and what happens in the web app. The calculation for the readonly question is:
| pulldata("@javascript","functions.js","teamRepeatFunction",${project_team}) |
The survey is not public, and is currently only shared with the owner.
/*
* JavaScript functions for Survey123
*/
function teamRepeatFunction(teamrepeat) {
var teamlist = "";
var i;
for (i = 0; i < teamrepeat.length; i++) {
teamlist = teamlist + teamrepeat[i].team_member_name+": " + teamrepeat[i].team_member_role + ", ";
}
return teamlist;
}