Using if statement


I want to change a label for the survey question, based on prior response. So, the question I want to change is:
“Does he/ she have a disability that limits functioning compared to others in his/ her age group?”,

I try calling the value ‘he’ or ‘she’ from prior question (i.e., q1) and change label to ‘her’ or ‘his’ age group depending on if ‘he’ or ‘she’ is returned.

My if statement inserted in the target question is: IF(${q1}=he,“his”,“her”). However, the code failed. See below for how the question displayed/printed:

Does she have any disability or difficulty that limits how she does things or functions when compared to most others in if(she=he,“his”,“her”) age group?

How do you correct this? Searched help but not finding any

Hi @rbellemail,

Would you mind sharing your xlsform with this section so that we could have a look at our end and see if it’s doable.

Have a great day!

you canNOT use a if clause directly in label. But you can create a variable (e.g. calculate type) and than reference it with ${…} in your label.
Hint: Be careful: KoBo needs if (small letters). If or IF will not work.
Kind regards


Thank you. My imagination got away with me there :laughing: I Appreciate the feedback


1 Like