If my repeat contains:
Charlie Smith
Mali Woods
River Phoenix
Chewy Dogg
${#crews} ${name_label} ${/} - will output: Charlie Smith Mali Woods River Phoenix Chewy Dogg
${#crews} ${name_label}, ${/} - if I add a comma after name label it will output: Charlie Smith, Mali Woods, River Phoenix, Chewy Dogg,
Is there a way to not show that last comma in the report?
Solved! Go to Solution.
@MikeOnzay - I received some help on this thread: https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-page-break-for-repeat-feat...
This works:
${#repeat1 | where:"Actions LIKE ‘%sample%’"}
${Your_Field}${if ($feature| getValue:"position")!=(repeat1 | where:"ActionsNeeded LIKE ‘%sample%’ AND ProjectMgmtGUID=’"+ProjectMgmtGUID+"’ AND !important" | stats:"count,objectid")}, ${/}
${/}
This adds the separator when the position is not equal to repeat instance count.
Inside the repeat, you need to get ${repeat...} to very specifically return a count of only the records you want. In my example, I used the GUID that associates the repeats with the parent, as well as another filter.
On the linked thread you can see the example of using $inputParams instead.
I think a workaround is to add a hidden question in the survey to store the list, using the join() function.
Put something like this in the calculation: join (",",${name_label})
@MikeOnzay - did you find a way get rid of the last comma other than adding a hidden question that Jing_Sun mentioned?
@MikeOnzay - I received some help on this thread: https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-page-break-for-repeat-feat...
This works:
${#repeat1 | where:"Actions LIKE ‘%sample%’"}
${Your_Field}${if ($feature| getValue:"position")!=(repeat1 | where:"ActionsNeeded LIKE ‘%sample%’ AND ProjectMgmtGUID=’"+ProjectMgmtGUID+"’ AND !important" | stats:"count,objectid")}, ${/}
${/}
This adds the separator when the position is not equal to repeat instance count.
Inside the repeat, you need to get ${repeat...} to very specifically return a count of only the records you want. In my example, I used the GUID that associates the repeats with the parent, as well as another filter.
On the linked thread you can see the example of using $inputParams instead.