hi glyn,
- Is it possible to define relevance expressions in Build for
questions inside the same group? I spent some timee trying to work out
why Collect was crashing every time I tried to open a particular form
I had made with relevance expressions that I was sure worked. Finally,
I removed all the the questions from the group, removed it, downloaded
the form again and it worked perfectly.
If this is the case, can relevance expressions be defined for grouped
questions in the xform?
relevance should work on groups and on questions within groups. the
catch here is that the former doesn't work in collect 1.1.5 due to a
bug and we haven't enabled it in build (bug at
http://code.google.com/p/opendatakit/issues/detail?id=258). should
work well in collect 1.1.7 though.
regardless, if something is crashing, there is something else wrong.
validate (http://opendatakit.org/use/validate) to make sure your form
is working. if that still doesn't work, past your form to
http://dpaste.com and send out a link. if it's a big form, please file
it as a bug at http://code.google.com/p/opendatakit/issues/list and
attach it there.
- We are doing a survey of about 6000 households. We want to generate
a unique id for each respondent consisting of their area, house and an
respondent number (e.g. area 01, household 123, respondent 12 =
0112312). I can think of several options, including: a) the
interviewer answers 3 questions, each corresponding to a relevant
fieldname (i.e. the area number, the household number; the respondent
number). For this they will either have to remember information from
the previous questionnaire or carry a checklist with them; b) pre-
printing barcodes (one for each area, household and respondent) but
this would require one for every possible scenario (e.g. 3 respondents
per house, each with several children); etc. Could anyone share what
worked for them?
can you explain a bit more about why you need a unique id?
understanding what that data is going to be used for will shape my
suggestions. for example, do you actually need them to remember that
the previous house was #4, and this one is #5? or do you just want
them uniquely identified?
my assumption is that you just want uniques ids and don't care too
much about ordering. if that is the case, you probably want to
generate household and respondent barcodes. when you start at a
household, scan a household id. when you start a respondent, scan a
new respondent id. if the respondent section is in a repeat, then they
are already coupled with their household. if not, then you'll have to
scan household and respondent id for each respondent. you'll also need
a process where you don't generate duplicate ids (look at uuid
generators) and a process where enumerators don't scan ids multiple
times (either have them cross it out, or give it the
household/respondent, et.). area number sounds like something
enumerators can remember (maybe they do an area a day?), so that, they
can enter.
if you want to be really fancy, you can build an id generator into
collect that ensures you don't repeat ids. that requires a programmer
though...
- Is it possible to enter a constraint message in the constraint
property in Build? Similarly, can you set a value based on answers to
previous questions? For example, if a respondent is at home
(resphome=1) but does not consent to interview (respconsent=0), can I
create a field or value intposs=0 (e.g. /data/resphome=1 and /data/
respconsent=0)? This would make setting subsequent relevance
properties much easier. Not sure if this last question makes sense:
I'm getting familiar with ODK but reluctant to play directly with
xforms.
build is designed to create 80% of the forms people want. the other
20% requires some manual tweaks because adding them makes build hard
to use. so for complex stuff, you will have to play directly with
xforms or hire some of the many groups on this list who make forms.
if you want to add a constraint message, you'll have to enter that
info manually. i've filed a bug to add that feature at
http://code.google.com/p/opendatakit/issues/detail?id=262.
yes, you can do variable assignment. that feature will likely never
show up in build. it looks something like this.
hope that helps,
yaw