Reference current person in the roster to a nested roster

Dear Survey solutions team,

I have a household roster (DayTrips) that asks members on their trips and whom they undertook the trips with (Q21DAYTRIP). In the same roster I ask them a question on whether they can give me information on expenditure of the trip [Q210Expense - This has 4 options (single select)].
Inside this DayTrips roster, I then have another roster (dayexpenses), which now asks individuals depending on the response given to the question on expenditure (Q210Expense). If you choose option 1, all those that traveled with you, their roster shows up (all hat traveled with you). if you chose option 2, only total expenditure question shows (this question is outside the second roster). If you choose option 4, only the current person roster open. Lastly if you choose option 3, no roster opens, and that’s the end of that interview.

This what i have in the enabling condition of the second roster (dayexpenses):
((Q21DAYTRIP.Any(p=>p.SequenceEqual(new[]{@rowcode}))) && Q210Expense == 1) ||
((Q21DAYTRIP.Any(p=>p.SequenceEqual(new[]{@rowcode}))) && Q21DAYTRIP.Length==1)

Option 1, 2 and 3 for Q210Expense are working well, but then option 4 isn’t working and i’m not sure how to get it to open the current person rosters only.

regards
Rabelani

Hello Rabelani,

when you are writing such conditions @rowcode refers to the code of the item [person] inside the roster being conditioned. If I understand your question correctly,
you need to refer to @rowcode of the parent roster. You can do this by creating a [long integer] variable at that roster

pcode = @rowcode

Then refer to the pcode to determine what is the code of the current person.

Best, Sergiy

Hello Sergiy

Thank you for the response, I got it to work as suggested.

regards
Rabelani