Making a question as READ-ONLY based on certain criteria

Hi,

I am collecting patient information, and based on a certain criteria (the logic of which I am collecting from the answers of the previous questions the user filled), I need to decide whether there is a need to refer the person to a doctor or not. If the logic is fulfilled, I want to lock the question that asks whether the referral should be done or not (probably by fixing the answer as YES and making READ-ONLY so that user cannot change the answer. If the logic is not met, the referral question remains open and user is free to choose from YES or NO.

How to make READ-ONLY programmable? One idea is to calculate a variable and switch it from NO to YES based on logic. Any other way?

Thanks,
Saad

Hi @Saad,
What about 2 questions, one writable and one read-only. Then you show the one you want depending on your variable with a relevant condition?

1 Like

Hi @Saad,

Instead of what you are exactly looking for, you can try this approach as an alternative.
Read Only alternatives.xlsx (9.7 KB)

Regards,
Raj

First have the to-be read only state (false and true) as a calculate question, say named determined_referral. Under the calculation column of this question, use a conditional statement such as if(${S1_Q1}='1' and ${S1_Q2}='2',"True","False"). Now, the read_only column of the question asking whether the referral should be done or not will just have what the calculate question resolved.