Collect data for a table/matrix

Try this:

repeat_for_list.xls (27 KB)

I had to resort to a little XForms 'black magic', but I think it'll do what you desire... :slight_smile:

Basically, the randomize() will generate an Xpath nodeset from your list, which you define using a select-one item list (but the select-one itself is hidden so the user doesn't actually see it!). This allows me to count() the number of items in the list. And this count is then used to explicitly specify the number of repeat groups to enumerate (see Statically defined repeats).

Then, in each repeat group, I used position(..) to give me the index of that group, which I then used with jr:choice-name() to retrieve the corresponding item in the list. WHEW! :sweat:

Please have a play and let me know if it works for you.

2 Likes