Select to view content in your preferred language

Survey123 Report: Page Break for Repeat Feature

4603
13
Jump to solution
07-01-2021 12:22 PM
by Anonymous User
Not applicable

I am trying to create a report that displays each new repeat feature to a new page.  I read some older posts that this is possible by adding index (=repeat count) to the survey.  (Link: https://community.esri.com/t5/arcgis-survey123-questions/survey123-feature-reporting-insert-page-bre...)

I did not add the repeat count to the survey and the data collection has been completed already.  Is there any way to achieve this (page break for each new repeat feature) without the repeat count?  That post is only a few months old but wanted to check if someone figured out new ways to handle it.  

Tags (1)
0 Kudos
13 Replies
Ruth_JiatengXu
Esri Contributor

Hi @JJ_Reyes ,

I am not sure if I understand your question correctly or not. If you want to show the last repeat instance in the repeat, you don't need to have a repeat count in the form. You can use the following in the repeat template:

 

${#repeat1 | resultRecordCount:1 | orderByFields:"objectid DESC"}

${field1InRepeat1}

${/}

 

Thanks,

Ruth

0 Kudos
JJ_Reyes
Frequent Contributor

Ah sorry @Ruth_JiatengXu  - I wasn't clear. It's more like trying to find the last repeat so a final separator doesn't display. If the code was something like this: 

${#repeat1}

${field1InRepeat1} <page break>

${/}

I'm looking to identify the last repeat so it does not have an extra page break at the end of the document.

0 Kudos
Ruth_JiatengXu
Esri Contributor

Hi @JJ_Reyes ,

Thanks for the information, you could use the following syntax.

${#repeat1}

${field1InRepeat1}

${if ($feature| getValue:"position")!=( r1 | where:"$inputParams !important" | stats:"count,objectid")} 

<page break>${/}

${/}

  • Add the page break when the position is not equal to repeat instance count.
  • Use ( r1 | where:"$inputParams !important" | stats:"count,objectid") to get repeat count inside ${#repeat1}${/}. 

Thanks,

Ruth

0 Kudos
JJ_Reyes
Frequent Contributor

This works great - thanks! I was able to add my own parameters instead of $inputParams as well.