I have having trouble initiating skip logic using a 'less than' command in the Relevant Selected binding. I want Question 2 to appear if the answer to Question 1 (integer) is less than 20.
Using ODK build, the syntax under Relevant is "(selected(/.../Q1<20))"
XML is "(selected(/.../Q1<20))"
When I use ODK validate, it says:
XPath evaluation: cannot handle function 'selected' requires 2 arguments. Only 1 provided.
I feel I have tried every combo of commas, quotes, double quotes to no avail (only different error messages). I can get it to work when equaling a specific value, just not less or greater than.
This seems like an easy fix and I'm overlooking something simple.
The selected(T,V) function is used for select-one and select-multiple
prompts, to test for the presence of a value choice (V) among the one or
more answers stored in the field (T).
It is not used for integer-value prompts.
If you just want to test whether an integer field (Q1) is less than 20, you
would simply write:
/.../Q1 < 20 (in ODK Build)
${Q1} < 20 (in XLSForm syntax)
/.../Q1 < 20 (in XML)
ยทยทยท
On Sat, Feb 14, 2015 at 10:34 AM, kefka wrote:
I have having trouble initiating skip logic using a 'less than' command in
the Relevant Selected binding. I want Question 2 to appear if the answer to
Question 1 (integer) is less than 20.
Using ODK build, the syntax under Relevant is "(selected(/.../Q1<20))"
XML is "(selected(/.../Q1<20))"
When I use ODK validate, it says:
XPath evaluation: cannot handle function 'selected' requires 2 arguments.
Only 1 provided.
I feel I have tried every combo of commas, quotes, double quotes to no
avail (only different error messages). I can get it to work when equaling a
specific value, just not less or greater than.
This seems like an easy fix and I'm overlooking something simple.