Reference Answers Outside of a Repeat Group

What is the problem? Please be detailed.
I am building a survey to collect transactional data from respondents, and at the end of the survey, I would like respondents to be able to view a page that lists all of the information they reported. I have been able to easily do this before using notes and references to specific values, but the issue I am running into this time is that my current survey requires the use of repeats to collect a certain number of records each interview.

From what I have read online, I thought that I might be able to use the indexed-repeat() function to reference the values for each question in each repeat, but when I tried putting it into practice, it did not work. I then thought I read on other pages that it was not possible in XLSForm to make references to specific values outside of the repeat group. Is that correct?

If I wanted to still make my review page, referencing all of the values from the repeat group at the end of the survey, would this be possible with more advanced knowledge of XForms coding?

What ODK tool and version are you using? And on what device and operating system version?
I am using XLSForms, ODK Collect (v1.17.2), and Android 9

Hi @Conor_Gallagher

could you attach your form? It's easier to fix the issue then.

Hi @Grzesiek2010

Yes, sure thing. Please find a copy of the xml survey attached. Would be happy to answer any questions, and would appreciate any help you can give!

-Conor

Peru_prototype_v2.xml (20.5 KB)

I mean an xls version if possible.

@Grzesiek2010 Sure thing, here it is.

Peru_prototype_v2.xls (34.5 KB)

Could you explain what exactly you want to display after your repeat group?
You have 5 questions in repeat group so let's say you have 4 repeats that means you want to display all those 5 answers 4 times? If so on one page or on 4 different pages. Or maybe just one answer from each group?

Just a quick sample please.

Sure thing. So let's say I go through three repeats. I would want one page that displays:

Category1
Income1/Expenditure1/Financial Tool1 (whichever matched the category)
Amount1
Category2
Income2/Expenditure2/Financial Tool2 (whichever matched the category)
Category3
Income3/Expenditure3/Financial Tool3 (whichever matched the category)
Amount3

Does that make sense/Is that possible?

Hi @Grzesiek2010, I just wanted to quickly follow up to see if you had any luck looking into this issue?

Hi @Conor_Gallagher,

If I get you correctly, you want to view answers from the repeat group. I have modified your form Peru_prototype_v2.xls (36.5 KB)
Note, with that procedure you are going to have alot of variables depending on the maximum repeats you provided. Does it work for you?

Hi @dicksonsamwel

I've taken a look at the updated file that you sent, but I do not think this will address my team's needs. Since there is not a maximum number of repeats that can be performed in our survey, I would have to code a high number of notes to ensure that the user could view a large number of entries. Also, I was hoping there might be a way to make the notes conditional on what information was selected in each repeat. For example, right now, users can only select one category for each repeat, and each category corresponds to a certain set of items. I would only want the user to see the category and items they selected for each repeat, otherwise it would be too confusing for them to understand.

Again, I am not sure if what I envision is actually possible in ODK, but it would be great if you could provide any insights into that.

Hi @Conor_Gallagher,

Peru_prototype_v2.xls (35.5 KB)

See the updated form, hope it gives you better insights

Hi Grzesiek2010,

Do you have any idea regarding this, specially for n number of repeats? I have posted the similar query in a fresh new topic also.

Kind regard,
Raj