Hello,
I am asking a date of birth to clients using Survey123 Connect.
As, sometimes it is difficult to get this information, I added other alternative questions.
Choices for birth_year:
Below are the statements and I don't know how to do it?
1. If (date_birth) is populated, I don't want the (year_birth) and (guess_birth_year) question to show up.
2. If (year_birth) is populated I don't want (guess_birth_year) question to show up.
The (guess_birth_year) is the last option for the surveyors to choose.
Thank you in advance for your assistance!
Solved! Go to Solution.
This is effectively a reductive series of answers. I've found it's clearer in these cases to ask a series of reductive questions, rather than evaluating whether a required answer has been populated.
The problem with evaluating whether another answer has been populated is that when the survey is first answered, no answers will be populated, so all questions will be visible. Users will then attempt to answer the first question to the best of their ability. In this case they will put something into the answer for the DOB question. This will then cause the next two questions to become invisible before the user has a chance to read them, and users will never realise they had a choice to specify that the answer is a guess.
So I'd avoid using hiding questions based on whether other questions are answered. It is very little additional effort to explicitly ask what level of knowledge a user has and then display the appropriate question.
Using an expression in the "relevant" column will show the question if the expression is true, and hide the question (and wipe any data inside) if false. The Form Expressions page is a good starting point on how to use this column. For most fields, the "string-length" function is a good test for empty questions, if the length is 0 then the field is empty, otherwise it isn't. Put two and two together and you should have a solution.
This is effectively a reductive series of answers. I've found it's clearer in these cases to ask a series of reductive questions, rather than evaluating whether a required answer has been populated.
The problem with evaluating whether another answer has been populated is that when the survey is first answered, no answers will be populated, so all questions will be visible. Users will then attempt to answer the first question to the best of their ability. In this case they will put something into the answer for the DOB question. This will then cause the next two questions to become invisible before the user has a chance to read them, and users will never realise they had a choice to specify that the answer is a guess.
So I'd avoid using hiding questions based on whether other questions are answered. It is very little additional effort to explicitly ask what level of knowledge a user has and then display the appropriate question.