I have challenge with IF statement- IF Statement

Hello Kal,
I need help with my XLS form. I have challenge with IF statement. What I want to do is this:

  1. I have a multiple choice question on FarmPractice.
  2. I have a geoshape which is will be used to measure Farm Size. I tried to contraint the geoshape to be >20M2 for it to be VALID but no success.
  3. I decided to use CertifyInformation to set the contraint.

My challenge is I dont want enumerator to be able to submit a farm that is for crop and less than 20square meter. Any other entry can be submitted. My xls is attached nn_v1.xlsx (14.9 KB)

Hello Guys,
I need help with my XLS form. I have challenge with IF statement. What I want to do is this:

  1. I have a multiple choice question on FarmPractice.
  2. I have a geoshape which is will be used to measure Farm Size. I tried to contraint the geoshape to be >20M2 for it to be VALID but no success.
  3. I decided to use CertifyInformation to set the contraint.

My challenge is I dont want enumerator to be able to submit a farm that is for crop and less than 20square meter. Any other entry can be submitted. My xls is attached nn_v1.xlsx (14.9 KB)

Try using this nested if command which should solve your issue:

if(selected(${FarmPractice},'Crop') and ${rounded_shape_squaredMeter}<=20,'1',if(selected(${FarmPractice},'Livestock') and ${rounded_shape_squaredMeter}<=20,'1','2'))

1 Like

Thank you for your support always. It Worked!

2 Likes