Want personid and names to appear from repeated group to other repeated group

I want person id from group_block3 to appear in block 9 by default against personid and names. I have applied indexed-repeat but I am unable to get the desired result. Please see the excel file.
new (2).xlsx (11.1 KB)

Maybe the following can help you: https://docs.getodk.org/form-repeats/.
You can also find other examples with the search function of this forum, please.

I want name to appear as the value for an answer

Do you want to be able to edit the name in the second repeat?
Because if you use a note and the calculation you already have, it works. But I don't know how to get that calculation as a default in a text or integer.

note	block9_personid	person id ${block9personid}
note	block9_name	    Name ${block9name}

Not sure if a trigger would help.

@nmambre is correct that in general trigger is a good way to define a dynamic default that gets changed based on another value in the form. You can read the documentation.

It's not currently possible to use a value in one repeat instance to trigger a recalculation of a value in another repeat instance.

What you can do to get something close is to use the once function to wrap the expression you want to use as to set a default. The once function evaluates the expression if the current value is blank. If the current value is not blank, it keeps the current value instead.

Here is your modified example: once-dynamic-default.xlsx (11.3 KB)

This is not related to your question but note that Household_size and members will always have the same value. Consider avoiding the counting and either using Household_size where you need it or setting it to members instead of computing it.

@LN what is the difference in using the calculation and the default column?
I was only using calculation with calculate type. Can I use calculation with any widget type?