Problem pulling repeated groups data

I have a survey form that contains repeated groups about family members, and I need to preload them into the form using an id_key.
As the repeated groups are stored in a second sheet, I have manipulated my data and merged them into one sheet in some specific order as in the picture

G1 is the first repeated group, Q1 is the first question, G2 second repeated gorup,Q2 second question … etc.
Now how is it possible to pull the data into the form in this way, so that when I enter the id_key i’ll get the repeated group filled with data (if 2 repeated, should be filed with 2 members) and so on…

Could you kindly elaborate. The requirement still seems unclear.

This approach may not work for what you intend

This is the potential reason why it will not work:

  1. The repeat data was organized by the system into a long format i.e. in a separate sheet with each row representing a unique repeat instance and traceable back to the household.
  2. You converted this format into a wide data format; which is a natural approach to how you want to analyze your data i.e. per household. If you needed to analyze per individual then you should have left it as long format.
  3. You need to pull the data using the wide-format into your form which in essence is actually designed in a long format.

The above 3 makes it a very difficult if not impossible task to create such a form. That said, I would suggest a totally different approach.

  1. Using the long format in the above steps i.e. 1, create a CSV file that has a unique household identifier.
  2. In your form, which is supposed to pull the data, you should potentially do the following:
  • Add a question that can pull the number of repeats i.e. household members that the household has, note, this could be sitting within the main data set based on the repeat. You need to have this pulled from the data. Let us call it ${householdrepeat}
  • Using ${householdrepeat} make this the default number of times the repeat will be conducted when the household number is entered.
  • At the beginning of your repeat question, add a calculation that would show that the repeat instance by using the formula position(…) in the calculation column.
  • Using pull data, which I am sure you are familiar with, pull data for when the household number is what you entered and the position is as you have in the instance i.e. previous bullet.

This generic workaround would help you with your form in long-format.


1 Like

I got your idea
so I use the repeat_count to open “x” time repeated groups, still I cant get 1 thing
How would I do the data manipulation in order to allow me to pull data, in my case a family may have like 4 members, so the point is how could I identify the whole members while neither of them have a unique key.
I mean they all for example have the parent_index 3, which means all the rows for this family will have a parent index 3
So how could I pull the members into the repeated groups
when I have 4 family members means 4 repeated groups will be open. so how can I pull the 4 members into the 4 repeated groups

Hi @dwaimah
I have just been able to respond comprehensively to this issue on the following topic below. I hope this will help