Referencing data in a previous section for validations

Hi there, quite new to Survey Solutions so please excuse what might be a very simple question.

I have a section in my survey called “basic_info” where I collect “age”. Later, in a new section I want to validate where self is “no” but “age” is >= 60 (using “&&”). I have tried all kinds of syntax references but it always comes back with a compile error - most usually about ‘age’ not existing in the current context.

I feel there must be an easy answer to this but not found it in the syntax guide - can anyone help?


It is still useful to see what specifically have you typed.

Then it is not a question of syntax, it’s a question of logic. The system is telling you that it does not understand what age you are talking about. The rest depends on the structure of the questionnaire, and you do not describe it.

Making a wild guess, you are probably asking age in a person-level roster, but writing a condition using age in the household section. In that case age is not valid in your condition. Indeed, different people within the same household will have different ages, what should the program substitute to the expression then??

Sorry, like I say, I am new to Survey Solutions and obviously haven’t followed best practice for posting a forum question. Despite my poor question your answer has helped so thanks for that, and I’ll do better to include the right content in my next question.

Thank you