Validation warning multiselect question comes "too soon"

Dear all,

I have a question about something I struggled with already in the past. I have a mulitselect question with tick boxes in which I ask about income sources. In previous runs of this survey, I found that respondents don’t mention all sources. E.g., respondents who in earlier questions indicate having livestock, don’t mention this as an income source (the question refers to both food and cash income).

For the current run of the survey I wanted to build in a warning validation, so if any livestock was indicated but it is not ticked as an income source, there is a warning to the enumerator to corroborate. My issue is that the validation fires when any change is made to the question, so the warning already pops up after indicating any income source (any other than livestock). I rather not have a warning pop up before a potential error is made.

A work around that I was told about in the past is to program the validation in the next question, but then the warning pops up in that question, rather than the income source question that has the problem, which is a little less nice. I suppose I could also use a yes/no mcq, but I don’t find that ideal either for this type of question. I wondered if anyone has found a more elegant workaround for this. I’ve listed the questions below as an example:

Q1 Does the household have any of the following livestock [mcq - Y/N]?
chickens…1
Goats…2
Etc

Q2 Could you mention the different income sources of the household (food and cash income) [mcq - multiselect]?
Crop farming…1
Livestock…2
Etc.
Current validation: !(!self.Contains(2) && Q1.Yes.Length>0)


Thinking more about this, perhaps better would be to ask a diffferent question, in the line of:

Q1 Besides “crop farming” and “fishing” and “livestock”, does the household have any other income sources?

I’ve seen some other examples of text piping on the forum, but that looked quite complicated to me. I determine participation in other activities in different ways (there are just three prior activities I ask about: fishing is asked about in HH roster - “does %rostertitle% fish”, crop farming through a question if they have land and plant crops, and livestock as indicated above). I also translate the survey (from English design language to one local language). Any suggestions on this?

Apologies that this has become a rather long question (and a bit vague perhaps at the end), but I thought the thinking process might perhaps help others too.

Many thanks again for any help anyone can offer!

Cheers,

Sebastiaan

I believe the root of the problem is the following, suppose you have choices X,Y,Z,T in a multiselect question Q1 (simple, with regular checkboxes). You have ticked Y. Should the program

A) consider your selection Y to be the answer of Q1 and start validation? or
B) await for more answers and do not do the validation of Q1 when Y is ticked?

Survey Solutions does A, since there is no special event, which could signal that there will be no more selections. As a hack, such an event could be proxied by answering any subsequent question, but you rule this out:

Indeed. But the only reason it is put to the next question is that validation may be run only if there is any answer. So if your ‘important’ option is the only one, and it is not checked, then no validation will be run.

Important: There is no validation that you can put on a multiselect question that will fire if there is no selection there.

Hence it must be dealt elsewhere. The next question is a good place. If you don’t like the question, you can place a static text in-between, and place your validation to the static text (most users don’t know static texts also have validations).

Another way could be to have an explicit confirmation question, which could trigger the validation:

Q2: INTERVIEWER! Have all the income sources been entered in the question above? Y/N

On Yes - start your validation of the multiselect.
On No - obviously, instruct to continue entering them.

This is used commonly for household members, where it is too early to show an error (e.g. in analysis of the family configuration) before all the members’ information is entered.

The best option in this case, however, is indeed the one which you rule out for no reason:

Then as soon as you register a negative answer for the option where you expect positive, then you know you are having an error situation.

Last, you need to ask yourself, if it can be deduced from other questions (e.g. from having livestock) that there is some income, do you need to indicate that as an error if the person doesn’t mention this? The answer is circumstantial. For example, a person may have no livestock now, but had income from it in the referenced period.

Dear Sergiy,

Thank you once again for a well thought through and elaborate answer. I always appreciate how you think about the background and purpose of the questions!

I understand why and how the validation on multiselect questions work (indeed impossible to know if more answers will follow). Static text or a confirmation question are nice options, especially as I can put an enabling condition on them to appear only if the previous question isn’t validated. Silly, I didn’t think of that. It is a nice solution. I must be getting rusty…

Just for info, I didn’t want a yes/no question, because I don’t want enumerators to read out income sources to the respondents to avoid priming, and want to reserve that question category for situations where they should read answers. It is a fairly long survey and it is hard to control when answer categories are read/not read in practice, I find.

I agree with you on your last point, so in situations such as these I create warnings with messages that the enumerator should corroborate and possibly correct an answer in either of the questions. I don’t treat such occassions as errors.

Thank you again, and hope you have a nice day!

Sebastiaan

Dear Sergiy,

Just wanted to let you and others know that the confirmation question works well, but I did it a little differently. I created the following text question (in capitals as it is an instruction to the enumerator):

Q2 ABOVE IT WAS INDICATED THAT THE HOUSEHOLD OWNS LIVESTOCK. DOES THE LIVESTOCK NOT PROVIDE FOOD OR CASH INCOME FOR THE HOUSEHOLD? CHECK WITH RESPONDENT AND IF NECESSARY MAKE CORRECTIONS IN THE INCOME SOURCE QUESTION OR IN THE LIVESTOCK QUESTIONS. IF THE ANSWERS ABOVE ARE CORRECT, PLEASE EXPLAIN HERE.

There is an enabling condition to Q2 that makes it appear only if the “validation” is not met (no actual validation rules in Q2).

Thanks again,

Sebastiaan