Is there a method to display all repeat rows within a survey instead of having them stacked (1 of x)?

655
6
03-11-2020 02:13 PM
HassanBasagic1
New Contributor II

I am creating a form to collect information on individual fish at several locations using Survey 123 Connect. I set up a repeat group to record individual fish attributes, however, the field crews need to see all repeated rows as the data is collected. Is there a method to display all completed repeated rows within a survey instead of having them stacked (1 of x)? The number of fish recorded at a site varies between 1 and ~100. I am using a grid formatted survey to replicate the field crews current data collection form. Attached is a screen capture of a simplified table example. Any advice is greatly appreciated.

0 Kudos
6 Replies
Philip-Wilson
Esri Frequent Contributor

Hi Hassan,

No this is not currently possible, each repeat is its own record and therefore can not be displayed on the same repeat. Some other ways you could consider to redesign your survey would be to use grid theme which does allow you to have a table view, however this does not use repeats, all records would be part of the same parent record or the first repeat.

Regards,

Phil.

0 Kudos
DougBrowning
MVP Frequent Contributor
0 Kudos
HassanBasagic1
New Contributor II

Thank you Phil and Doug,

For now, I have deployed a grid theme with repeats.

--Hassan

ThomasBeers
New Contributor II

This would be really useful to view the results of a repeat on a "review" page at the end of a survey. 

ThomasBeers
New Contributor II

There is a way to do this using java script functions. Read in what you want to display using a calc field:


pulldata("@javascript","displayrho.js","samples", ${RHO})

Simply make the function return the string: 

function samples(RHO)
{
//dsiplay all samples
return RHO;
}

Then make a note field using ${DisplayRHO} . This will list them with comma's in between. Let me know if you find a way to get this in table format! 

Test snow sampling.JPG

You can find a great write up on JS functions in survey123 here: 

https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js-f...

StrathconaBTS
New Contributor II

I came up with a hack for this. I used an HTML table to display the entire contents of the repeat. Unfortunately CSS is not supported so I had to revert to deprecated table attributes:

  1. For each repeat I created a calculate that created a table row by concatenating each field surrounded by tr and td tags- in my case named veg_html_row
  2. I then concatenated all the rows inside some table and table header tags using another calculate outside of the repeat - see veg_html_rows
  3. I then put the results in a note field

Screenshot 2021-09-15 120027.png

 

Screenshot 2021-09-15 121312.png

 

0 Kudos