Select to view content in your preferred language

auto populate repeat records with information from a csv

331
1
05-01-2024 04:37 AM
ChristopherDawe
Regular Contributor

I am trying to build a survey for use in validating the suitability of equipment used for field surveys, and provide photographs and text for where something inst suitable, and hoping to use repeats to avoid unnecessarily long surveys and provide neater data management.I have 6 "kits" each containing 15-25 items which have a description, type and serial number, and would like to be able to pre-populate a repeat record with the information relating to each item, and then the user just moves through the repeats adding the final question of suitability and if "no is selected" then the photo and text appears.

I could of course just set up the repeat and the user selects the item from the drop down, but this wont ensure that every item in the kit is assessed. Being able to select "kit 1" and then a repeat appears with 20 records all pre-filled with that kits item details would make things much easier.

Currently my survey is built without repeats and just has every item as a "select_one yes_no" in a long list with a relevant photo and text question. These select_one questions have a relevant based on the kit they belong to, but this is causing an unnecessarily long survey and inst particularly easy for reporting where I would have to put in every question rather than just use the  repeat functionality in reports

Im looking for something like the below where the first 3 questions are pre-filled through the 15-20 repeats depending on the region and kit you select and then the user just selecting suitability (and then adding further phto and text if required)

ChristopherDawe_0-1714563162562.png

Any ideas would be greatly appreciated!

0 Kudos
1 Reply
DougBrowning
MVP Esteemed Contributor

You could use pulldata with a lookup on position or once(count()) method maybe.  They would still need to navigate through each repeat to get them to fire though.  

Here is how I do it to label the repeats A, B, C, etc.  May be more work for you with multiple options but I thought I would post it in case.  It could work where you calc the name of the csv to do the lookup to which I have for to work in another project.

See the red info getting auto filled.

Trasnsects.gif

In the form you get the repeat number and use that in a pulldata.

DougBrowning_0-1714571669809.png

Then you have a csv that lines up the repeat number and the value.

DougBrowning_1-1714571725325.png

You may be tempted then use repeat count to set the exact number of repeats.  This often does not work since it then creates all the repeats at the start and that can cause calcs to not go right.  Instead I set a constraint and warning once the count gets past the max repeat number and it works better.

Hope that helps.

0 Kudos