I want that if (tubewell) tw is equal to either dtw, etw or stw or either two of them or all of them, the respondent is a water seller; else a water buyer. I tried the following but did not work. can you pl help? Earlier, I tried ‘or’ instead of ‘and’ but that excluded respondent having 2 of three or all three and called them water buyers. Also in that case, ‘water_buyer’ came up on its own and changed only when respondent had a dtw or etw or stw.
Hello @TushaarKOBO,
this seems a problem of your if logic, not of KoBo, please. You may develop and test your if clause step-by-step, starting with a small combknation.
Can you please tell me what is wrong with this calculate formula?
if((${yd}<1000),150, if((${yd}>1000), and (${yd}<2500)), 200, if((${yd}>2500), 250,’ '))
I want to say that labour needed is 150 days if crop yield is <1000 kg/acre, 200 days if yield is between 1000 and 2500 and 250 days if yield exceeds 2500 kg.
Hello @TushaarKOBO,
remove the comma before the and.
You may always check your form during development with the Online validator ODK - XLSForm Online v2.x