Hi, I have a conditional statement calculation in my survey in that is returning an error:
"XPath evaluation: cannot handle function 'if' requires 3 arguments, Only 2 provided."
As you can see , so I am stumped. Your input is much appreciated.
if(selected(${JenisPelanggaran},'1'),'Alat Tangkap', if(selected(${JenisPelanggaran},'2'),'Biota Dilindungi', if(selected(${JenisPelanggaran},'3'),'Destruktif/ Merusak', if(selected(${JenisPelanggaran},'4'),'Habitat Penting', if(selected(${JenisPelanggaran},'5'),'IUU Fishing', if(selected(${JenisPelanggaran},'6'),'Jasa Lingkungan (TLPJL)', if(selected(${JenisPelanggaran},'7'),'Pengrusakan Terumbu Karang', if(selected(${JenisPelanggaran},'8'),'Pengrusakan Padang Lamun', if(selected(${JenisPelanggaran},'9'),'Pengrusakan Mangrove', if(selected(${JenisPelanggaran},'10'),'SOP Pemanfaatan', if(selected(${JenisPelanggaran},'11'),'Zonasi')))))))))))
Hello @HanggarPrasetio1 , is your last expression missing a value for when the condition is False ?
Something like :
if(selected(${JenisPelanggaran},'11'),'Zonasi','None of the above'
This post has an example
if(condition, value if true,
if(condition, value if true,
if(condition, value if true,
if(condition, value if true,
if(condition, value if true, value if false)))))
Helpful tip for S123. While the formulas in the XLSX sheet are NOT Excel compatible, Excel will still give you the "helper" features if you add in "=" in front of the formula.
To do this and check your formula: