If statement with two variables from pulldata

Dear Community,

I have been trying to use if statement with two variables as in the attached excel - where I highlighted yellow. It doesn’t work. Could you please enlighten me on what is wrong with this code? Thanks in advance.

Sample.xlsx (24.9 KB)

@Phearun, did you print your nested if-statement to see if it works? I see that some have only one condition (i.e., the variable SAMPLE should only have a specific value) while the other has two conditions (i.e., SAMPLE and PROVINCE) to satisfy.

@Kal_Lam : Thanks for your response. I didn’t do that. I just tried deploying the form, and it cannot be deployed and it shows an error message as below. By the way, how to print the nested if-statement?

@Phearun, maybe you could validate your XLSForm through this online validator to see if there are any syntax issues in your XLSForm. You could print out the output from the if-statement expression (to see whether it works or not) by prinint them through response in a question as outlined in the support article Including Responses Inside Another Question.