Am working on a project that needs a respondent to indicate an amount or dont know if they dont want to disclose the amount.
I have placed the question in a group in the example below
begin group table_list_a1
integer Q50_1 Amount
select_one q50_ans Q50_2 Don’t Know
end group table_list_a1
How can I place a constraint that either the amount or don't know should be answered before proceeding to the next question or how can I best approach it.
Thanks in advance
it might be difficult to do that using constraint because of its limitations I described here: https://github.com/opendatakit/javarosa/issues/327
Does your group use
field-list appearance? If not I would recommend adding
select_one first (yes/no options) with question let's say
Do you know the amount...? and then integer question relevant if selected option from the previous question is yes.
I'm curious if anyone knows a better solution.
An easy approach (at least what I would do) is to add a hint column and enter a hint e.g. "if don't know enter 98". That way you can still make the question required and can be answered at the same time.
@PN and @Innocent, I am interested to hear from you why the question needs to be required. What I would do is ask data collectors to leave the value blank if it's unknown. Do you think it's too likely they'll accidentally swipe beyond the question without considering it?
Thanks for the feedback.
The idea was to have the integer and dk on one 1 slide that and avoiding interviewers swiping away without considering it(as LN mentioned) and ending up with both amount and dk as blanks and at the same time avoiding to introduce an extra slide as indicated by Greziesk.
@LN Yes it may happen that data collectors accidentally swipe without filling a response to a question. That is the essence of making the questions required.
Along the lines of Grzegorz, I might suggest the first question in a field-list be a select_one, say 'applicable'/'NA' (prefilled to applicable) with the second question being your numeric input, which is required but relevant only if the select_one is applicable. That way the numeric question will always show up and have to be filled in, unless the user explicitly selects NA, in which case the numeric question will then disappear.