Automatically create repeats with data collected in parent form?

787
3
02-14-2019 09:50 AM
BrentKinal1
Occasional Contributor III

Is it possible to auto-create repeat records from data collected in parent forms?  Basically what I am trying to do is streamline data collection by allowing the user to answer a select multiple question (containing 5 choices) and a couple other questions in the parent form and then create a separate repeat / related record for each selection from the select multiple question populated with the that selection and the answers to the other questions all of which will populate questions in all of the repeats.

Tags (1)
3 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Brent,

This is partially supported in Survey123.  You could set the repeat_count field to set the number of repeats based on the value of the count-selected(${q}) function.  You should be able to get values from the multiple choice question by having a hidden field using once(count()) to get an index of the repeat, which can then be used in a selected-at() function to get a particular choice. 

Czapiga_Jason
New Contributor II

Could you please show an example in the xls how this would work.  I have a similar situation.  I have a parent record that collects a point and all the information about a site, but I would like the repeat to auto populate records based on a select multiple question for sample type and some other questions in the parent form.  I have the calculation working in the repeat to create the ID for each record, but not as separate records because I don't quite understand how to add more repeat records based on the select multiple. 

example> sample 001 at location Z sampled by crew xyz in the main point feature has 4 different samples (a, b, c, d) in the repeat table.  the sample type a, b, c, d is selected in the main form from a select multiple.  I have a calculation in a field in the repeat that concatenates all those parameters into a sampleID (xyzZa001, xyzZb001, xyzZc001,xyzZd001). 

 

I would like to auto populate the repeat with those 4 records instead of having each sample type a, b, c, d, as separate columns in the main form.  I know I could set it up that way and do some post processing to transpose them, but I'd prefer to be hands off and have the form do it for me.

chargeetudeti
New Contributor II

Hi  do you have find somthings to do that ? Thniks 

 

0 Kudos