'if' Statement Arguments Error

1019
1
01-08-2018 07:39 AM
RymaAneliunas1
New Contributor

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 I have four, so I am stumped.  Your input is much appreciated.

if(${stoff}>1200,'EXT INFLUENCE',if(${stoff}>860,'PROTECTED',if(${stoff}>840,'MARGINAL',if(${stoff}<840,'UNPROTECTED'))))

Tags (1)
0 Kudos
1 Reply
JamesTedrick
Esri Esteemed Contributor

Hi Ryma,

Your innermost if statement will need a value if false (that's the 3rd value the error mentions).  It looks like the evaluation can be simplified to 3 if statements:

if(${stoff}>1200,'EXT INFLUENCE',if(${stoff}>860,'PROTECTED',if(${stoff}>840,'MARGINAL','UNPROTECTED')))