1st: do not send posts to both opendatakit@ and opendatakit-developers@.
This question is appropriate for opendatakit@.
The other list is for people that are writing or modifying the Java
software. Sending to both does not raise the visibility of the issue. It
just irritates the 100's of people that are on both lists and who see 2
separate, identical, messages.
ODK Build does not recognize the ${fieldname} syntax available in XLSForm.
If you want to reference another field's value, you must either provide the
full XPath to that field (e.g., /data/group1/nestedgroup3/fieldA ) or a
relative XPath (e.g., ../../nestedgroup3/fieldA ). If all your fields are
in the same group in ODK Build, then you can reference them via
../otherfieldname
Otherwise, the path is easiest to construct by first generating an XML
document from ODK Build and viewing its block (in an editor like
notepad++). The instance block describes the structure of the groupings and
fields within your form.
Most people find that XLSForm is easier to use for larger forms because of
its ${fieldname} shorthand (which is automatically converts to a full XPath
expression to the field).
So, in summary:
Group 1 cannot have a relevant condition that is dependent upon the values
of the fields within group 1.
I assume, therefore that Q4 is asked outside of Group 1 and Group 2.
The relevant condition for these two groups is evaluated relative to being
at/on/in that group.
So to refer to Q4, you likely need to use:
../Q4
Now, you state that Q4 has two values 0 and 1, for "No" and "Yes".
This implies that you wrote it as a select-one question, with 2 choices.
In that case, the values 0 and 1 are not actually integer values -- they
are string values (all select-one and select-multiple choices are
strings). And:
"0" != 0
So your relevant conditions likely need to be:
../Q4 = "1"
../Q4 = "0"
And if Q4 is in some other group, you would need to adjust the path to
refer to that group.
The ODK Validate tool
can be useful to validate the generated XML file to verify that it is
well-formed.
I think it should catch bad field references.
···
On Thu, Feb 18, 2016 at 2:07 PM, wrote:
Hi, everyone. I am brand new to ODK (and XML Forms for that matter) and
have successfully set up ODK Collect and Aggregate. My form that I built in
ODK Build has shown up in ODK Collect on the tablet (it is a valid form
according to ODK Validate). BUT....I cannot get the skip pattern to work 
For some reason my form on ODK Collect does not display the questions that
are dependent on the previous one (i.e., skip patterns not working). I set
up the first skip pattern the following way: I created two Groups: Group 1
has 3 questions and in the Group 1 Properties I have it so that it is
relevant if Q4 = 1 (i.e., 'Yes'). I did the same for Group 2 but in this
case it is if Q4 = 0 (i.e., 'No'). None of the questions in either Group 1
or 2 show up on the form regardless of how I answer Q4. In the Group 1 and
2 Properties section I have not checked Looped or Display On One Screen.
Could it be this?
I also have a question at the end that is dependent on the previous one.
Since it is only one question I just put the condition in the Relevance
field: Q10 = 1.
None of the questions that have a Relevance statement appear on my ODK
Collect form.
Note that I have made all of my questions Required.
Any and all help would be greatly appreciated!!
Thanks!
Best,
Adam
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com