Maybe this post discussed previously should help you understand on merging a repeat group dataset to the main sheet: