If statement to return a value of the previous question

Hi All,
I want to use the if statement to return a value entered in previous
question.
if(/data/consent_yes/breached_position =
'yes','/data/consent_yes/nearest_phcc','/data/consent_yes/nearest_dc_health_facility')

But this return the xpath it self instead of the value entered. Any
workaround?
Thanks.

··· -- Peter Dotto Lubambi, Information Technology Officer, D-tree International, Tanzania. +255 786 087 087 PPP: *http://tz.linkedin.com/in/plubambi*

Hi Peter,

Your if is returning the literal text because you have put it inside single
quotes. If you remove the single quotes it should return the value rather
than the literal text.

Amelia

··· On Sat, Dec 15, 2012 at 2:25 PM, Peter D Lubambi wrote:

Hi All,
I want to use the if statement to return a value entered in previous
question.
if(/data/consent_yes/breached_position =
'yes','/data/consent_yes/nearest_phcc','/data/consent_yes/nearest_dc_health_facility')

But this return the xpath it self instead of the value entered. Any
workaround?
Thanks.

Peter Dotto Lubambi,
Information Technology Officer,
D-tree International,
Tanzania.
+255 786 087 087
PPP: http://tz.linkedin.com/in/plubambi