Show/hide questions with relevance based on child's age

Hi, I have browsed many topics on the forum for the date case but mine still no working.
Are these lines correct?


I've calculated the age of the child by doing ( year_of_birth - date_obs)
What I want is : if the child has more than 5 years I'll ask him some questions. So I want to use the "isMoreFive" in relevant line.

thank in advance

From what I understand, you're using isMoreFive in a relevant column but that row isn't showing and hiding as you'd expect.

The relevant column should always have true/false (boolean) expressions in it. isMoreFive will either have the value 1 or the value 0 and therefore can never be false. You probably want isMoreFive to be just ${ageInYears} >= 5 or to use that expression directly in the relevant column without introducing a new calculate.

1 Like

hi @abdoul
please find attached a sample xlsform which can solve your problem for you.


AGE.xlsx (47.1 KB)

survey view

please let us know if this solve your problem or not


Hello, Thank you all it's fixed.