Survey 123 Dynamic Repeat Solution

09-04-2020 10:58 AM
by Anonymous User
Not applicable


I am creating a project to collect attribute field metadata on about 150 feature classes and tables. I have decided to leverage Survey123 (Connect) so that my subject experts can just fill out a survey for each feature class, then I can review and update the metadata on my end.  The survey design so far is rather simple and I have shortened my choices list to just (5) feature classes for now.

The solution that I would greatly appreciate some help with is creating a dynamic repeat based on the number of attribute fields in each feature class.  Essentially, I have two select_one questions to choose the 'theme' and 'feature class' (theme_list' and 'fcs' in choices list)... what I'd like to see is once the user picks a feature class, the repeat should pull the number of attribute fields ('fields' in the survey choice list) and that's the number of repeats the user is required to fill out.

I have seen some solutions on this subject where folks have had success leveraging a 'fieldcount' integer field to pull the repeat from, which I have tried to no avail...I have left the 'fieldcount' column in the choices list in case there is a helpful friend out there who better understands this solution and wouldn't mind lending some assistance.

Thanks for reading, I appreciate any help!

3 Replies
Esri Regular Contributor

Hello Zachary Hunt‌, 

One option would be to leverage the pulldata() function. The function utilizes a csv file stored in the media folder that contains a lookup and return column. 

I have attached a zipfile containing the sample you had passed along which utilizes the pulldata() function. 

In short I just created a csv file that has two columns a ret (return) and look (look-up). Ret contains the number of fields in the feature class (to be used in the repeat count). look contains the feature class names from the choices sheet. 

The syntax I used in the repeat_count was int(pulldata('fields','ret','look',${feat})) where 'fields' is the name of the csv file, ret and look as discussed above, and ${feat} is the feature class question. 

One thing to keep in mind is we are planning on supporting select_one and select_multiple from file with the 3.11 release. At the moment cascading selects is not working, but could be one thing to keep an eye out on. The reason this could be helpful is depending on how often your feature classes are updating you can offload all the information in your choices sheet to CSV file(s) use the update media folder script to automate the process of updating the content in the CSV file(s) via the script. 

Thank you, 


Thank you,
by Anonymous User
Not applicable

Hi Zach,

The power of Zach squared prevails once again! Thank you very much for the assistance, looks like this is exactly the solution I was looking for.  I'll look forward to the 3.11 release, thanks for the heads up.

Much appreciated,


New Contributor II

Zachary Hunt‌ sorry to be of no help, but would you mind sharing your finished product with us here in the forums? I would love to use this template for my own organisation metadata review!