I am getting a build error with the following if statement. The error says
there are only two arguments when we need three.
if(/data/duration <= "10","1", if(/data/duration>"10" and
/data/duration<="20", "2"), if(/data/duration>"20", "3"))
What I want is to calculate a score. It will equal 1 if duration is <=10, 2
if duration is between 10 and 20, and 3 if duration is greater than 20.
Duration is captured in another question called duration.
every if() needs 3 arguments: (1) the condition, (2) what to do if the
condition is true, (3) what to do if the condition is false
···
On Mon, Dec 9, 2013 at 12:40 PM, Sangya Kaphle wrote:
Hi All,
I am getting a build error with the following if statement. The error says
there are only two arguments when we need three.
if(/data/duration <= "10","1", if(/data/duration>"10" and
/data/duration<="20", "2"), if(/data/duration>"20", "3"))
What I want is to calculate a score. It will equal 1 if duration is <=10,
2 if duration is between 10 and 20, and 3 if duration is greater than 20.
Duration is captured in another question called duration.
every if() needs 3 arguments: (1) the condition, (2) what to do if the
condition is true, (3) what to do if the condition is false
On Mon, Dec 9, 2013 at 12:40 PM, Sangya Kaphle skaphle@dimagi.com wrote:
Hi All,
I am getting a build error with the following if statement. The error
says there are only two arguments when we need three.
if(/data/duration <= "10","1", if(/data/duration>"10" and
/data/duration<="20", "2"), if(/data/duration>"20", "3"))
What I want is to calculate a score. It will equal 1 if duration is <=10,
2 if duration is between 10 and 20, and 3 if duration is greater than 20.
Duration is captured in another question called duration.
I am getting a build error with the following if statement. The error
says there are only two arguments when we need three.
if(/data/duration <= "10","1", if(/data/duration>"10" and
/data/duration<="20", "2"), if(/data/duration>"20", "3"))
What I want is to calculate a score. It will equal 1 if duration is
<=10, 2 if duration is between 10 and 20, and 3 if duration is greater than
20. Duration is captured in another question called duration.