[XLSform] Upload error "There is no survey element with this name."

Hi ODK Community,

I'm trying to construct a question that asks respondents who owns the plot
of land. The survey choices are the household members specified as
variables in another part of the survey 'hhmember' and non-household
members like the government 'plotowner'. The coding is as follows

Type: select_one plotowner or_other
Name: plotowner
Label: Who owns the ${plotname}?
Relevant: if(selected(${select_one_plotowner}, 'other'), ${specify_other
hhmember}, ${select_one hhmember})

Under Relevant, my intent was to provide both the 'plotowner' choices
alongside the 'hhmember' choices. Is there a better way to do this syntax?
I encountered the following error when I tried to upload the survey as
well: Error: There has been a problem trying to replace
${select_one_plotowner} with the XPath to the survey element named
'select_one_plotowner'. There is no survey element with this name. I don't
know if this is related to the Relevant syntax or more related to the Type
column. Please advise. I look forward to your feedback.

Best,
Michael

Hi Michael,
There are a few things I think I should clarify:

  • The choices for a select question can only come from choices sheet.
    You can filter choices based on the answers to previous questions, but you
    cannot add them. For documentation on how to filter choices see the
    cascading select section in the ODK XLSForm documentationhttp://opendatakit.org/help/form-design/xlsform/.
    If you're willing to edit the xform, there may be a way to add choices that
    are answers to previous questions using an itemset. I haven't tried this
    before, so it might not work, and if you're new to xforms, it won't be easy
    to do.
  • ${specify_other hhmember} is not valid syntax. ${} can only have names
    from the name column inside it.
  • or_other can be used with select_all and select_one type questions.
  • When you use or_other, a specify other question named [select question
    name]_other will automatically be added to your survey. For this reason it
    may be preferable in some cases to add an "other" option to your choices
    sheet instead.

That said, for your problem simplest thing to do might be to use a text
input question to specify the plot owner.
Regards,
-Nathan

··· On Wednesday, September 19, 2012 10:11:47 PM UTC-7, ニコノコ wrote: > > And when using "Other", you should use "select*_all* or_other" > and not "select_one" > > On Thursday, September 20, 2012, m_optimal wrote: > >> Hi ODK Community, >> >> I'm trying to construct a question that asks respondents who owns the >> plot of land. The survey choices are the household members specified as >> variables in another part of the survey 'hhmember' and non-household >> members like the government 'plotowner'. The coding is as follows >> >> Type: select_one plotowner or_other >> Name: plotowner >> Label: Who owns the ${plotname}? >> Relevant: if(selected(${select_one_plotowner}, 'other'), ${specify_other >> hhmember}, ${select_one hhmember}) >> >> Under Relevant, my intent was to provide both the 'plotowner' choices >> alongside the 'hhmember' choices. Is there a better way to do this syntax? >> I encountered the following error when I tried to upload the survey as >> well: Error: There has been a problem trying to replace >> ${select_one_plotowner} with the XPath to the survey element named >> 'select_one_plotowner'. There is no survey element with this name. I >> don't know if this is related to the Relevant syntax or more related to the >> Type column. Please advise. I look forward to your feedback. >> >> Best, >> Michael >> >> >> >> -- >> Post: opendatakit@googlegroups.com >> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >

I don't think this will work as it is. You have to put each branch on a
separate line and add the appropriate relevant code for each

Check this: example syntax for
skippinghttp://formhub.org/syntax/#skipping-questions

··· On Thursday, September 20, 2012, m_optimal wrote:

Hi ODK Community,

I'm trying to construct a question that asks respondents who owns the plot
of land. The survey choices are the household members specified as
variables in another part of the survey 'hhmember' and non-household
members like the government 'plotowner'. The coding is as follows

Type: select_one plotowner or_other
Name: plotowner
Label: Who owns the ${plotname}?
Relevant: if(selected(${select_one_plotowner}, 'other'), ${specify_other
hhmember}, ${select_one hhmember})

Under Relevant, my intent was to provide both the 'plotowner' choices
alongside the 'hhmember' choices. Is there a better way to do this syntax?
I encountered the following error when I tried to upload the survey as
well: Error: There has been a problem trying to replace
${select_one_plotowner} with the XPath to the survey element named
'select_one_plotowner'. There is no survey element with this name. I
don't know if this is related to the Relevant syntax or more related to the
Type column. Please advise. I look forward to your feedback.

Best,
Michael

--
Post: opendatakit@googlegroups.com <javascript:_e({}, 'cvml',
'opendatakit@googlegroups.com');>
Unsubscribe: opendatakit+unsubscribe@googlegroups.com <javascript:_e({},
'cvml', 'opendatakit%2Bunsubscribe@googlegroups.com');>
Options: http://groups.google.com/group/opendatakit?hl=en