I have a repeating group called Group (really, there's a reason for that, it's not just a lame name) that contains a field called GroupName. There is a repeating section that is most often used for one item, but users can add additional items. Each of these items corresponds to one Group.
I want the appropriate GroupName field to appear in the repeating section. Group 1's name should appear in the first instance of the section, group 2's name should appear in the second instance, and so on.
But I can't get this to work. Referencing GroupName always gives me the name of the first group.
The repeating section is defined within the Group group as I assumed that's from where the various GroupName fields could be accessed. And I've tried GroupName[position()] as a value but that always gets me the first group too.
Any suggestions or pointers to solutions would be much appreciated.
Paul