Constraint on one of the two non-compulsory questions response

Hi all,

I have a question which has options and both the options have two different data type. I have split the question into two separate questions and have not made them compulsory. This means that if the user fills the first question they should not be filling the second question. I want to know in a situation where the user fills both the questions or when both the questions are empty, is there a constraint command that i can add to the second question so that they make the corrections there and then?

I am sharing the question that has been split into two questions

Additionally, I am mentioning the code I was using that did not work:
(${date} = '.' and ${not_sel} = '.') or (${date} = '' and ${not_sel} = '')


Try this:

The idea is not to use a constraint but relevant and wrap out questions in a group with field-list as appearance

1 Like

Thanks for your reply, @Alexander_Torrado

I do not think I fully understand this logic. Why is the 'prefer not to say' marked as required? I tried this but it is not working for me.

'prefer not to say' is mandatory but hidden if a date is supplied. So you can guarantee either a date or 'prefer no to say' as an answer. See this short video:

Ah i see it now. This was very basic, thank you for explaining in detail! I just started using ODK so still understanding its various form building features.