CloudCare Error message when trying to test new app

Hi,

I just created a simple app (basically just a questionaire / survey) and
went to try it in CloudCare. However, this error message popped up:

internal error handling request: <type
’org.javarosa.xpath.XPathException’>: org.javarosa.xpath.XPathException:
The problem was located in Relevant expression for /data XPath evaluation:
Bad argument to function ‘selected’. Argument #2 should be a single
potential value from the list of select options, but instead evaluated to:
true

What does this mean and how do I fix the problem?

Thank you!
Emily

Emily,

It sounds like you’re using the function selected() as described here
https://confluence.dimagi.com/display/commcarepublic/CommCare+Functions#CommCareFunctions-selected
with
an invalid second argument.

Specifically, the second argument to that function needs to be one of the
potential single select values (IE ‘yes’) - in your case, that value seems
to be a truth condition evaluating to “true”.

Hope this helps,
Will

It sounds like you’re using the function “selected” as described here

··· On Fri, Jun 5, 2015 at 8:03 AM wrote:

Hi,

I just created a simple app (basically just a questionaire / survey) and
went to try it in CloudCare. However, this error message popped up:

internal error handling request: <type
’org.javarosa.xpath.XPathException’>: org.javarosa.xpath.XPathException:
The problem was located in Relevant expression for /data XPath evaluation:
Bad argument to function ‘selected’. Argument #2 should be a single
potential value from the list of select options, but instead evaluated to:
true

What does this mean and how do I fix the problem?

Thank you!
Emily


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks, Will, that helped me figure it out!

··· On Friday, June 5, 2015 at 12:08:26 PM UTC, William Pride wrote: > > Emily, > > It sounds like you're using the function selected() as described here > with > an invalid second argument. > > Specifically, the second argument to that function needs to be one of the > potential single select values (IE 'yes') - in your case, that value seems > to be a truth condition evaluating to "true". > > Hope this helps, > Will > > It sounds like you're using the function "selected" as described here > On Fri, Jun 5, 2015 at 8:03 AM <em...@malihealth.org > wrote: > >> Hi, >> >> I just created a simple app (basically just a questionaire / survey) and >> went to try it in CloudCare. However, this error message popped up: >> >> internal error handling request: > 'org.javarosa.xpath.XPathException'>: org.javarosa.xpath.XPathException: >> The problem was located in Relevant expression for /data XPath evaluation: >> Bad argument to function 'selected'. Argument #2 should be a single >> potential value from the list of select options, but instead evaluated to: >> true >> >> What does this mean and how do I fix the problem? >> >> Thank you! >> Emily >> >> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> >