Hi Anibal
I have looked at your example and attached is a sample file for the example you have just. so you can try it to see if it best solve your problem.
xlsform
diabetes.xlsx (46.8 KB)
survey
choice
i have limited the names that will be listed in which of them has diabetes to 5 names, you can add more by creating more calculations and increasing the index repeat number to the largest number you want. example indexed-repeat(${name}, ${people}, xxxxxxx)
please try this and let us know your feedback. hope this will solve your problem now.
Thanks
fabla2020@gmail.com