Hello Survey Solutions team.
I hope everybody is fine.
I have a roster households named Roster_HH, inside this I have a roster nested for the members of the households named Roster_Members, for each member I have a question for know the age and if this member have personal expenses.
I have a section named Expenses_Personal specifically for the expenses personal, but this section only should be enable for those members (in each one houselholds) that have personal expenses and that greatter than 10 years old.
I have written this in the enabling condition for the section Expenses_Personal:
Roster_HH[(int)@rowcode].Roster_Members.Any(x => x.expensesPersonal== 1 && x.age>= 10)
But it does not work.
Can somebody help me to build my enable condition for the section Expenses_personal?
Thanks SuSo team.
From the first look the expression appears valid, but the interpretation of the @rowcode depends on WHERE this expression is written.
Is the section Expenses_Personal also in a roster? which one? Or is it at the top level? Then you should get an error that @rowcode doesn’t have a meaning at that level, which would be correct.
If Expenses_Personal is within the Roster_HH roster, then please elaborate on “it does not work”. What error message are you getting? Or if you are getting no error message than what combination of input data results in an incorrect behavior?
This is the section where I have my variables
This is the section I want to enable for each member in each household when age>=10 and expensesPersonal==1 (yes)
This compile well, but @rowcode doesn’t have a meaning at that level in the section Expenses_Personal then when I tester, this section never is enable when I have member with personal expenses and age greatter than 10 years old.