XLS form, string answers appear as multiple choice answer later in survey

Dear All,

This question is for XLS forms in formhub:

I am looking to make a form that has the following:

  1. Repeating Group:
    1a- Name of Family Member (answers: Amina, Fatima, Zainab)
    1b- Age of family member
    1c- Highest school of family member
    ** End repeat group

  2. Which of the following is the caregiver in the family? (select_one)
    options - Amina, Fatima, Zainab

So essentially, the string answers from #1a would show up as options in #2.

My question is:

  1. Is this possible? And if yes, can you please provide me with an example
  2. If it is not possible now, is there someone who can code this for me
    with a deadline of Friday? And if yes, what is the cost?

Thanks and I appreciate your timely response!
Evelyn

··· -- Evelyn Castle Director, eHealth Systems Africa www.eHealthAfrica.org 25 Race Course Road, Kano, Ng mobile: (NG) 0809-515-0585 (US) 714-627-9289

Evelyn,

SurveyCTO has a sample form that demonstrates this, and I don't think that
it uses SurveyCTO-only features. If you sign up at www.surveycto.com, login
to your server, click on the Help tab, click on "Sample Forms" on the left,
then click on "Rosters: Choosing among earlier entries" on the right,
you'll see a discussion of the method, be able to download two variations
of the sample, etc.

It won't cost you a dime -- but if you fall in love with SurveyCTO, we'll
ask you to start paying $99 to keep using it beyond 30 days.

Best,

Chris

··· On Mon, Nov 25, 2013 at 4:06 PM, Evelyn Castle wrote:

Dear All,

This question is for XLS forms in formhub:

I am looking to make a form that has the following:

  1. Repeating Group:
    1a- Name of Family Member (answers: Amina, Fatima, Zainab)
    1b- Age of family member
    1c- Highest school of family member
    ** End repeat group

  2. Which of the following is the caregiver in the family? (select_one)
    options - Amina, Fatima, Zainab

So essentially, the string answers from #1a would show up as options in #2.

My question is:

  1. Is this possible? And if yes, can you please provide me with an example
  2. If it is not possible now, is there someone who can code this for me
    with a deadline of Friday? And if yes, what is the cost?

Thanks and I appreciate your timely response!
Evelyn

--
Evelyn Castle
Director, eHealth Systems Africa
www.eHealthAfrica.org http://www.eHealthNigeria.org
25 Race Course Road, Kano, Ng
mobile: (NG) 0809-515-0585
(US) 714-627-9289

--

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/groups/opt_out.

Hi Christopher,

Thanks so much for showing me SurveyCTO. It has been a huge help and we
will definitely become a member.

I have an additional question:

Based on the rosters: I have the following 2 questions:

select_one hhmember o1_1 Child's name select_one ynrd o2_1 Is ${o1_1}’s
natural mother alive?
In the questions text, I am seeing the ID number of the person since the
type is a select_one. What I want is to see the person's name.

Can someone let me know how I can do that?

Thanks
Evelyn

··· On Mon, Nov 25, 2013 at 10:14 PM, Christopher Robert wrote:

Evelyn,

SurveyCTO has a sample form that demonstrates this, and I don't think that
it uses SurveyCTO-only features. If you sign up at www.surveycto.com,
login to your server, click on the Help tab, click on "Sample Forms" on the
left, then click on "Rosters: Choosing among earlier entries" on the right,
you'll see a discussion of the method, be able to download two variations
of the sample, etc.

It won't cost you a dime -- but if you fall in love with SurveyCTO, we'll
ask you to start paying $99 to keep using it beyond 30 days.

Best,

Chris

On Mon, Nov 25, 2013 at 4:06 PM, Evelyn Castle evelyn@ehealthnigeria.orgwrote:

Dear All,

This question is for XLS forms in formhub:

I am looking to make a form that has the following:

  1. Repeating Group:
    1a- Name of Family Member (answers: Amina, Fatima, Zainab)
    1b- Age of family member
    1c- Highest school of family member
    ** End repeat group

  2. Which of the following is the caregiver in the family? (select_one)
    options - Amina, Fatima, Zainab

So essentially, the string answers from #1a would show up as options in
#2.

My question is:

  1. Is this possible? And if yes, can you please provide me with an example
  2. If it is not possible now, is there someone who can code this for me
    with a deadline of Friday? And if yes, what is the cost?

Thanks and I appreciate your timely response!
Evelyn

--
Evelyn Castle
Director, eHealth Systems Africa
www.eHealthAfrica.org http://www.eHealthNigeria.org
25 Race Course Road, Kano, Ng
mobile: (NG) 0809-515-0585
(US) 714-627-9289

--

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/groups/opt_out.

--

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/groups/opt_out.

--
Evelyn Castle
Director, eHealth Systems Africa
www.eHealthAfrica.org http://www.eHealthNigeria.org
25 Race Course Road, Kano, Ng
mobile: (NG) 0809-515-0585
(US) 714-627-9289

Hi Evelyn,

I'm glad to hear that SurveyCTO has been useful.

For moving from a value to a label, you can use the jr:choice-name()
function. In this case, you'd have to create a calculate field with
jr:choice-name() in the calculation column, to pull the child's actual name
into a field -- then reference that field in the later label. Our
documentation for jr:choice-name() is:

jr:choice-name(value, 'field'): Returns the label for a select_one or
select_multiple field choice (as in the calculate expression
"jr:choice-name(${selectonefield}, '${selectonefield}')" to return the
label for the currently-selected choice in the selectonefield field). For
select_multiple fields, you can combine with selected-at() to get the label
for individual selections (as in
"jr:choice-name(selected-at(${selectmultfield}, 0), '${selectmultfield}')"
to return the label for the first choice in the selectmultfield field).

This should also work in non-SurveyCTO versions of Collect, though we
recently fixed jr:choice-name() to work properly when referencing a field
with a cascading-select filter. It occurs to me that we haven't shared that
fix back with the community, so if you're filtering the list of names then
jr:choice-name() may fail if you're using ODK Collect. (I'll make sure that
we share this and some other fixes with the community ASAP.)

Best,

Chris

··· On Thu, Dec 5, 2013 at 5:10 AM, Evelyn Castle wrote:

Hi Christopher,

Thanks so much for showing me SurveyCTO. It has been a huge help and we
will definitely become a member.

I have an additional question:

Based on the rosters: I have the following 2 questions:

select_one hhmember o1_1 Child's name select_one ynrd o2_1 Is
${o1_1}’s natural mother alive?
In the questions text, I am seeing the ID number of the person since the
type is a select_one. What I want is to see the person's name.

Can someone let me know how I can do that?

Thanks
Evelyn

On Mon, Nov 25, 2013 at 10:14 PM, Christopher Robert < crobert@surveycto.com> wrote:

Evelyn,

SurveyCTO has a sample form that demonstrates this, and I don't think
that it uses SurveyCTO-only features. If you sign up at www.surveycto.com,
login to your server, click on the Help tab, click on "Sample Forms" on the
left, then click on "Rosters: Choosing among earlier entries" on the right,
you'll see a discussion of the method, be able to download two variations
of the sample, etc.

It won't cost you a dime -- but if you fall in love with SurveyCTO, we'll
ask you to start paying $99 to keep using it beyond 30 days.

Best,

Chris

On Mon, Nov 25, 2013 at 4:06 PM, Evelyn Castle <evelyn@ehealthnigeria.org wrote:

Dear All,

This question is for XLS forms in formhub:

I am looking to make a form that has the following:

  1. Repeating Group:
    1a- Name of Family Member (answers: Amina, Fatima, Zainab)
    1b- Age of family member
    1c- Highest school of family member
    ** End repeat group

  2. Which of the following is the caregiver in the family? (select_one)
    options - Amina, Fatima, Zainab

So essentially, the string answers from #1a would show up as options in
#2.

My question is:

  1. Is this possible? And if yes, can you please provide me with an
    example
  2. If it is not possible now, is there someone who can code this for me
    with a deadline of Friday? And if yes, what is the cost?

Thanks and I appreciate your timely response!
Evelyn

--
Evelyn Castle
Director, eHealth Systems Africa
www.eHealthAfrica.org http://www.eHealthNigeria.org
25 Race Course Road, Kano, Ng
mobile: (NG) 0809-515-0585
(US) 714-627-9289

--

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/groups/opt_out.

--

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/groups/opt_out.

--
Evelyn Castle
Director, eHealth Systems Africa
www.eHealthAfrica.org http://www.eHealthNigeria.org
25 Race Course Road, Kano, Ng
mobile: (NG) 0809-515-0585
(US) 714-627-9289

--

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/groups/opt_out.

it works with ODK Collect too.

*--*Ricardo Abdala
:phone: (61) 81225545 | 33276992
:email: rcabdala@gmail.comhttps://app.getsignals.com/link?url=mailto%3Arcabdala%40gmail.com&ukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgICpkJkJDA&k=263204ca-68ad-49e7-f2a0-2259c129d9a0|
ricardo@developer.com.brhttps://app.getsignals.com/link?url=mailto%3Aricardo%40developer.com.br&ukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgICpkJkJDA&k=75a0b02c-847c-445a-d9f3-9edaefc54c5c
☼ pesquisadecampo.com.brhttps://app.getsignals.com/link?url=http%3A%2F%2Fs.wisestamp.com%2Flinks%3Furl%3Dpesquisadecampo.com.br%26sn%3D&ukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgICpkJkJDA&k=cf36303f-c1f0-4dd7-b4d7-a35b8f921672|
dgrau.com.br
https://app.getsignals.com/link?url=http%3A%2F%2Fs.wisestamp.com%2Flinks%3Furl%3Ddgrau.com.br%26sn%3D&ukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgICpkJkJDA&k=73b5c42b-a0c8-4fbd-c64d-696db0ad2135|
developer.com.brhttps://app.getsignals.com/link?url=http%3A%2F%2Fs.wisestamp.com%2Flinks%3Furl%3Ddeveloper.com.br%26sn%3D&ukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgICpkJkJDA&k=78fdea00-41ea-4dd4-82f3-2cee0b9c3072
Get a signature like this.
https://app.getsignals.com/link?url=http%3A%2F%2Fs.wisestamp.com%2Flinks%3Furl%3Dhttp%253A%252F%252Fr1.wisestamp.com%252Fr%252Flanding%253Fpromo%253D18%2526dest%253Dhttp%25253A%25252F%25252Fwww.wisestamp.com%25252Femail-install%25253Futm_source%25253Dextension%252526utm_medium%25253Demail%252526utm_campaign%25253Dpromo_18%26sn%3D&ukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgICpkJkJDA&k=408e1a39-cd0e-4ece-a0a6-fd6df1d91415
Click
here.https://app.getsignals.com/link?url=http%3A%2F%2Fs.wisestamp.com%2Flinks%3Furl%3Dhttp%253A%252F%252Fr1.wisestamp.com%252Fr%252Flanding%253Fpromo%253D18%2526amp%253Bdest%253Dhttp%25253A%25252F%25252Fwww.wisestamp.com%25252Femail-install%25253Futm_source%25253Dextension%252526utm_medium%25253Demail%252526utm_campaign%25253Dpromo_18%26sn%3D&ukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgICpkJkJDA&k=26760f59-12d9-4424-e0d7-3a607b221312

··· 2013/12/5 Christopher Robert

Hi Evelyn,

I'm glad to hear that SurveyCTO has been useful.

For moving from a value to a label, you can use the jr:choice-name()
function. In this case, you'd have to create a calculate field with
jr:choice-name() in the calculation column, to pull the child's actual name
into a field -- then reference that field in the later label. Our
documentation for jr:choice-name() is:

jr:choice-name(value, 'field'): Returns the label for a select_one or
select_multiple field choice (as in the calculate expression
"jr:choice-name(${selectonefield}, '${selectonefield}')" to return the
label for the currently-selected choice in the selectonefield field). For
select_multiple fields, you can combine with selected-at() to get the label
for individual selections (as in
"jr:choice-name(selected-at(${selectmultfield}, 0), '${selectmultfield}')"
to return the label for the first choice in the selectmultfield field).

This should also work in non-SurveyCTO versions of Collect, though we
recently fixed jr:choice-name() to work properly when referencing a field
with a cascading-select filter. It occurs to me that we haven't shared that
fix back with the community, so if you're filtering the list of names then
jr:choice-name() may fail if you're using ODK Collect. (I'll make sure that
we share this and some other fixes with the community ASAP.)

Best,

Chris

On Thu, Dec 5, 2013 at 5:10 AM, Evelyn Castle evelyn@ehealthnigeria.orgwrote:

Hi Christopher,

Thanks so much for showing me SurveyCTO. It has been a huge help and we
will definitely become a member.

I have an additional question:

Based on the rosters: I have the following 2 questions:

select_one hhmember o1_1 Child's name select_one ynrd o2_1 Is
${o1_1}’s natural mother alive?
In the questions text, I am seeing the ID number of the person since the
type is a select_one. What I want is to see the person's name.

Can someone let me know how I can do that?

Thanks
Evelyn

On Mon, Nov 25, 2013 at 10:14 PM, Christopher Robert < crobert@surveycto.com> wrote:

Evelyn,

SurveyCTO has a sample form that demonstrates this, and I don't think
that it uses SurveyCTO-only features. If you sign up at
www.surveycto.com, login to your server, click on the Help tab, click
on "Sample Forms" on the left, then click on "Rosters: Choosing among
earlier entries" on the right, you'll see a discussion of the method, be
able to download two variations of the sample, etc.

It won't cost you a dime -- but if you fall in love with SurveyCTO,
we'll ask you to start paying $99 to keep using it beyond 30 days.

Best,

Chris

On Mon, Nov 25, 2013 at 4:06 PM, Evelyn Castle < evelyn@ehealthnigeria.org> wrote:

Dear All,

This question is for XLS forms in formhub:

I am looking to make a form that has the following:

  1. Repeating Group:
    1a- Name of Family Member (answers: Amina, Fatima, Zainab)
    1b- Age of family member
    1c- Highest school of family member
    ** End repeat group

  2. Which of the following is the caregiver in the family? (select_one)
    options - Amina, Fatima, Zainab

So essentially, the string answers from #1a would show up as options in
#2.

My question is:

  1. Is this possible? And if yes, can you please provide me with an
    example
  2. If it is not possible now, is there someone who can code this for me
    with a deadline of Friday? And if yes, what is the cost?

Thanks and I appreciate your timely response!
Evelyn

--
Evelyn Castle
Director, eHealth Systems Africa
www.eHealthAfrica.org http://www.eHealthNigeria.org
25 Race Course Road, Kano, Ng
mobile: (NG) 0809-515-0585
(US) 714-627-9289

--

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/groups/opt_out.

--

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/groups/opt_out.

--
Evelyn Castle
Director, eHealth Systems Africa
www.eHealthAfrica.org http://www.eHealthNigeria.org
25 Race Course Road, Kano, Ng
mobile: (NG) 0809-515-0585
(US) 714-627-9289

--

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/groups/opt_out.

--

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/groups/opt_out.

Dear Chris,

Do you have an example of using
"jr:choice-name(selected-at(${selectmultfield}, 0), '${selectmultfield}')"
in an XLS form. I have a multi select field 'province' , based on
multi-selection , I want to display corresponding districts , but I am
getting error message using the 'multiselectfield' option.

My code for calculation field is below:
if(string-length(${I_province}) !=
0,jr:choice-name(selected-at(${I_province}, 0),
'${I_province}'),'(unspecified province)')

I get the following error:

  • FormLogicError: Could not evaluate: if(string-length(
    /model/instance[1]/SDR_v0.1/GP2/I_province ) !=
    0,jr:choice-name(selected-at( /model/instance[1]/SDR_v0.1/GP2/I_province ,
    0), ' /SDR_v0.1/GP2/I_province '),'(unspecified province)'), message:
    Function "{http://openrosa.org/javarosa}choice-name" does not exist.

Thank you for your help.

Malick

··· On Thursday, December 5, 2013 at 11:24:45 AM UTC+1, Christopher Robert wrote: > > Hi Evelyn, > > I'm glad to hear that SurveyCTO has been useful. > > For moving from a value to a label, you can use the jr:choice-name() > function. In this case, you'd have to create a calculate field with > jr:choice-name() in the calculation column, to pull the child's actual name > into a field -- then reference that field in the later label. Our > documentation for jr:choice-name() is: > > jr:choice-name(value, 'field'): Returns the label for a select_one or > select_multiple field choice (as in the calculate expression > "jr:choice-name(${selectonefield}, '${selectonefield}')" to return the > label for the currently-selected choice in the selectonefield field). For > select_multiple fields, you can combine with selected-at() to get the label > for individual selections (as in > "jr:choice-name(selected-at(${selectmultfield}, 0), '${selectmultfield}')" > to return the label for the first choice in the selectmultfield field). > > > This should also work in non-SurveyCTO versions of Collect, though we > recently fixed jr:choice-name() to work properly when referencing a field > with a cascading-select filter. It occurs to me that we haven't shared that > fix back with the community, so if you're filtering the list of names then > jr:choice-name() may fail if you're using ODK Collect. (I'll make sure that > we share this and some other fixes with the community ASAP.) > > Best, > > Chris > > > > On Thu, Dec 5, 2013 at 5:10 AM, Evelyn Castle <eve...@ehealthnigeria.org > wrote: > >> Hi Christopher, >> >> Thanks so much for showing me SurveyCTO. It has been a huge help and we >> will definitely become a member. >> >> I have an additional question: >> >> Based on the rosters: I have the following 2 questions: >> >> select_one hhmember o1_1 Child's name >> select_one ynrd o2_1 Is ${o1_1}’s natural mother alive? >> In the questions text, I am seeing the ID number of the person since the >> type is a select_one. What I want is to see the person's name. >> >> Can someone let me know how I can do that? >> >> Thanks >> Evelyn >> >> >> On Mon, Nov 25, 2013 at 10:14 PM, Christopher Robert < cro...@surveycto.com > wrote: >> >>> Evelyn, >>> >>> SurveyCTO has a sample form that demonstrates this, and I don't think >>> that it uses SurveyCTO-only features. If you sign up at >>> www.surveycto.com, login to your server, click on the Help tab, click >>> on "Sample Forms" on the left, then click on "Rosters: Choosing among >>> earlier entries" on the right, you'll see a discussion of the method, be >>> able to download two variations of the sample, etc. >>> >>> It won't cost you a dime -- but if you fall in love with SurveyCTO, >>> we'll ask you to start paying $99 to keep using it beyond 30 days. >>> >>> Best, >>> >>> Chris >>> >>> >>> >>> On Mon, Nov 25, 2013 at 4:06 PM, Evelyn Castle < eve...@ehealthnigeria.org > wrote: >>> >>>> Dear All, >>>> >>>> This question is for XLS forms in formhub: >>>> >>>> I am looking to make a form that has the following: >>>> >>>> 1. Repeating Group: >>>> 1a- Name of Family Member (answers: Amina, Fatima, Zainab) >>>> 1b- Age of family member >>>> 1c- Highest school of family member >>>> ** End repeat group >>>> >>>> 2. Which of the following is the caregiver in the family? (select_one) >>>> options - Amina, Fatima, Zainab >>>> >>>> So essentially, the string answers from #1a would show up as options in >>>> #2. >>>> >>>> My question is: >>>> 1. Is this possible? And if yes, can you please provide me with an >>>> example >>>> 2. If it is not possible now, is there someone who can code this for me >>>> with a deadline of Friday? And if yes, what is the cost? >>>> >>>> Thanks and I appreciate your timely response! >>>> Evelyn >>>> >>>> -- >>>> Evelyn Castle >>>> Director, eHealth Systems Africa >>>> www.eHealthAfrica.org >>>> 25 Race Course Road, Kano, Ng >>>> mobile: (NG) 0809-515-0585 >>>> (US) 714-627-9289 >>>> >>>> -- >>>> -- >>>> Post: opend...@googlegroups.com >>>> Unsubscribe: opendatakit...@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...@googlegroups.com . >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> >>> -- >>> -- >>> Post: opend...@googlegroups.com >>> Unsubscribe: opendatakit...@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...@googlegroups.com . >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> >> >> -- >> Evelyn Castle >> Director, eHealth Systems Africa >> www.eHealthAfrica.org >> 25 Race Course Road, Kano, Ng >> mobile: (NG) 0809-515-0585 >> (US) 714-627-9289 >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@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...@googlegroups.com . >> For more options, visit https://groups.google.com/groups/opt_out. >> > >

Hi Malick,

It looks like whatever is giving you that error doesn't support the
jr:choice-name() function. Where do you get the error? Is it converting
your Excel file to XML, validating your XML, or running on Collect? It
seems perhaps an issue with whatever version of software you are running...

Best,

Chris

··· On Thu, Jun 16, 2016 at 4:57 AM KM wrote:

Dear Chris,

Do you have an example of using
"jr:choice-name(selected-at(${selectmultfield}, 0), '${selectmultfield}')"
in an XLS form. I have a multi select field 'province' , based on
multi-selection , I want to display corresponding districts , but I am
getting error message using the 'multiselectfield' option.

My code for calculation field is below:
if(string-length(${I_province}) !=
0,jr:choice-name(selected-at(${I_province}, 0),
'${I_province}'),'(unspecified province)')

I get the following error:

  • FormLogicError: Could not evaluate: if(string-length(
    /model/instance[1]/SDR_v0.1/GP2/I_province ) !=
    0,jr:choice-name(selected-at( /model/instance[1]/SDR_v0.1/GP2/I_province ,
    0), ' /SDR_v0.1/GP2/I_province '),'(unspecified province)'), message:
    Function "{http://openrosa.org/javarosa}choice-name" does not exist.

Thank you for your help.

Malick
On Thursday, December 5, 2013 at 11:24:45 AM UTC+1, Christopher Robert wrote:

Hi Evelyn,

I'm glad to hear that SurveyCTO has been useful.

For moving from a value to a label, you can use the jr:choice-name()
function. In this case, you'd have to create a calculate field with
jr:choice-name() in the calculation column, to pull the child's actual name
into a field -- then reference that field in the later label. Our
documentation for jr:choice-name() is:

jr:choice-name(value, 'field'): Returns the label for a select_one or
select_multiple field choice (as in the calculate expression
"jr:choice-name(${selectonefield}, '${selectonefield}')" to return the
label for the currently-selected choice in the selectonefield field). For
select_multiple fields, you can combine with selected-at() to get the label
for individual selections (as in
"jr:choice-name(selected-at(${selectmultfield}, 0), '${selectmultfield}')"
to return the label for the first choice in the selectmultfield field).

This should also work in non-SurveyCTO versions of Collect, though we
recently fixed jr:choice-name() to work properly when referencing a field
with a cascading-select filter. It occurs to me that we haven't shared that
fix back with the community, so if you're filtering the list of names then
jr:choice-name() may fail if you're using ODK Collect. (I'll make sure that
we share this and some other fixes with the community ASAP.)

Best,

Chris

On Thu, Dec 5, 2013 at 5:10 AM, Evelyn Castle eve...@ehealthnigeria.org wrote:

Hi Christopher,

Thanks so much for showing me SurveyCTO. It has been a huge help and we
will definitely become a member.

I have an additional question:

Based on the rosters: I have the following 2 questions:

select_one hhmember o1_1 Child's name
select_one ynrd o2_1 Is ${o1_1}’s natural mother alive?
In the questions text, I am seeing the ID number of the person since the
type is a select_one. What I want is to see the person's name.

Can someone let me know how I can do that?

Thanks
Evelyn

On Mon, Nov 25, 2013 at 10:14 PM, Christopher Robert < cro...@surveycto.com> wrote:

Evelyn,

SurveyCTO has a sample form that demonstrates this, and I don't think
that it uses SurveyCTO-only features. If you sign up at
www.surveycto.com, login to your server, click on the Help tab, click
on "Sample Forms" on the left, then click on "Rosters: Choosing among
earlier entries" on the right, you'll see a discussion of the method, be
able to download two variations of the sample, etc.

It won't cost you a dime -- but if you fall in love with SurveyCTO,
we'll ask you to start paying $99 to keep using it beyond 30 days.

Best,

Chris

On Mon, Nov 25, 2013 at 4:06 PM, Evelyn Castle < eve...@ehealthnigeria.org> wrote:

Dear All,

This question is for XLS forms in formhub:

I am looking to make a form that has the following:

  1. Repeating Group:
    1a- Name of Family Member (answers: Amina, Fatima, Zainab)
    1b- Age of family member
    1c- Highest school of family member
    ** End repeat group

  2. Which of the following is the caregiver in the family? (select_one)
    options - Amina, Fatima, Zainab

So essentially, the string answers from #1a would show up as options
in #2.

My question is:

  1. Is this possible? And if yes, can you please provide me with an
    example
  2. If it is not possible now, is there someone who can code this for
    me with a deadline of Friday? And if yes, what is the cost?

Thanks and I appreciate your timely response!
Evelyn

--
Evelyn Castle
Director, eHealth Systems Africa
www.eHealthAfrica.org http://www.eHealthNigeria.org
25 Race Course Road, Kano, Ng
mobile: (NG) 0809-515-0585
(US) 714-627-9289

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@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...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@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...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
Evelyn Castle
Director, eHealth Systems Africa
www.eHealthAfrica.org http://www.eHealthNigeria.org
25 Race Course Road, Kano, Ng
mobile: (NG) 0809-515-0585
(US) 714-627-9289

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@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...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
--
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.

Dear Chris,

Thank you for your reply. I am using it on Kobo toolbox, using the enketo
browser to do data entry. The message is thrown when the form loads in the
browser. Kobo toolbox does support 'jr:choice-name() function' as I have
tested it many times but never used jr:choice-name for multiselect. Is the
following calculation syntax correct:

if(string-length(${I_province}) !=
0,jr:choice-name(selected-at(${I_province}, 0),
'${I_province}'),'(unspecified province)')

Thanks again,

Malick

··· On Thursday, June 16, 2016 at 11:08:53 AM UTC+2, Christopher Robert wrote: > > Hi Malick, > > It looks like whatever is giving you that error doesn't support the > jr:choice-name() function. Where do you get the error? Is it converting > your Excel file to XML, validating your XML, or running on Collect? It > seems perhaps an issue with whatever version of software you are running... > > Best, > > Chris > > On Thu, Jun 16, 2016 at 4:57 AM KM <kashif....@gmail.com > wrote: > >> Dear Chris, >> >> Do you have an example of using >> "jr:choice-name(selected-at(${selectmultfield}, 0), '${selectmultfield}')" >> in an XLS form. I have a multi select field 'province' , based on >> multi-selection , I want to display corresponding districts , but I am >> getting error message using the 'multiselectfield' option. >> >> My code for calculation field is below: >> if(string-length(${I_province}) != >> 0,jr:choice-name(selected-at(${I_province}, 0), >> '${I_province}'),'(unspecified province)') >> >> I get the following error: >> >> - FormLogicError: Could not evaluate: if(string-length( >> /model/instance[1]/SDR_v0.1/GP2/I_province ) != >> 0,jr:choice-name(selected-at( /model/instance[1]/SDR_v0.1/GP2/I_province , >> 0), ' /SDR_v0.1/GP2/I_province '),'(unspecified province)'), message: >> Function "{http://openrosa.org/javarosa}choice-name" does not exist. >> >> Thank you for your help. >> >> Malick >> On Thursday, December 5, 2013 at 11:24:45 AM UTC+1, Christopher Robert wrote: >> >>> Hi Evelyn, >>> >>> I'm glad to hear that SurveyCTO has been useful. >>> >>> For moving from a value to a label, you can use the jr:choice-name() >>> function. In this case, you'd have to create a calculate field with >>> jr:choice-name() in the calculation column, to pull the child's actual name >>> into a field -- then reference that field in the later label. Our >>> documentation for jr:choice-name() is: >>> >>> jr:choice-name(value, 'field'): Returns the label for a select_one or >>> select_multiple field choice (as in the calculate expression >>> "jr:choice-name(${selectonefield}, '${selectonefield}')" to return the >>> label for the currently-selected choice in the selectonefield field). For >>> select_multiple fields, you can combine with selected-at() to get the label >>> for individual selections (as in >>> "jr:choice-name(selected-at(${selectmultfield}, 0), '${selectmultfield}')" >>> to return the label for the first choice in the selectmultfield field). >>> >>> >>> This should also work in non-SurveyCTO versions of Collect, though we >>> recently fixed jr:choice-name() to work properly when referencing a field >>> with a cascading-select filter. It occurs to me that we haven't shared that >>> fix back with the community, so if you're filtering the list of names then >>> jr:choice-name() may fail if you're using ODK Collect. (I'll make sure that >>> we share this and some other fixes with the community ASAP.) >>> >>> Best, >>> >>> Chris >>> >>> On Thu, Dec 5, 2013 at 5:10 AM, Evelyn Castle >> >> Hi Christopher, >>>> >>>> Thanks so much for showing me SurveyCTO. It has been a huge help and we >>>> will definitely become a member. >>>> >>>> I have an additional question: >>>> >>>> Based on the rosters: I have the following 2 questions: >>>> >>>> select_one hhmember o1_1 Child's name >>>> select_one ynrd o2_1 Is ${o1_1}’s natural mother alive? >>>> In the questions text, I am seeing the ID number of the person since >>>> the type is a select_one. What I want is to see the person's name. >>>> >>>> Can someone let me know how I can do that? >>>> >>>> Thanks >>>> Evelyn >>>> >>> On Mon, Nov 25, 2013 at 10:14 PM, Christopher Robert < cro...@surveycto.com> wrote: >>>> >>> Evelyn, >>>>> >>>>> SurveyCTO has a sample form that demonstrates this, and I don't think >>>>> that it uses SurveyCTO-only features. If you sign up at >>>>> www.surveycto.com, login to your server, click on the Help tab, click >>>>> on "Sample Forms" on the left, then click on "Rosters: Choosing among >>>>> earlier entries" on the right, you'll see a discussion of the method, be >>>>> able to download two variations of the sample, etc. >>>>> >>>>> It won't cost you a dime -- but if you fall in love with SurveyCTO, >>>>> we'll ask you to start paying $99 to keep using it beyond 30 days. >>>>> >>>>> Best, >>>>> >>>>> Chris >>>>> >>>>> On Mon, Nov 25, 2013 at 4:06 PM, Evelyn Castle < eve...@ehealthnigeria.org> wrote: >>>>> >>>> Dear All, >>>>>> >>>>>> This question is for XLS forms in formhub: >>>>>> >>>>>> I am looking to make a form that has the following: >>>>>> >>>>>> 1. Repeating Group: >>>>>> 1a- Name of Family Member (answers: Amina, Fatima, Zainab) >>>>>> 1b- Age of family member >>>>>> 1c- Highest school of family member >>>>>> ** End repeat group >>>>>> >>>>>> 2. Which of the following is the caregiver in the family? (select_one) >>>>>> options - Amina, Fatima, Zainab >>>>>> >>>>>> So essentially, the string answers from #1a would show up as options >>>>>> in #2. >>>>>> >>>>>> My question is: >>>>>> 1. Is this possible? And if yes, can you please provide me with an >>>>>> example >>>>>> 2. If it is not possible now, is there someone who can code this for >>>>>> me with a deadline of Friday? And if yes, what is the cost? >>>>>> >>>>>> Thanks and I appreciate your timely response! >>>>>> Evelyn >>>>>> >>>>>> -- >>>>>> Evelyn Castle >>>>>> Director, eHealth Systems Africa >>>>>> www.eHealthAfrica.org >>>>>> 25 Race Course Road, Kano, Ng >>>>>> mobile: (NG) 0809-515-0585 >>>>>> (US) 714-627-9289 >>>>>> >>>>>> -- >>>>>> -- >>>>>> Post: opend...@googlegroups.com >>>>>> Unsubscribe: opendatakit...@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...@googlegroups.com. >>>>> >>>>> >>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>> >>>>> >>>>> -- >>>>> -- >>>>> Post: opend...@googlegroups.com >>>>> Unsubscribe: opendatakit...@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...@googlegroups.com. >>>> >>>> >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>> >>>> >>>> >>>> -- >>>> Evelyn Castle >>>> Director, eHealth Systems Africa >>>> www.eHealthAfrica.org >>>> 25 Race Course Road, Kano, Ng >>>> mobile: (NG) 0809-515-0585 >>>> (US) 714-627-9289 >>>> >>>> -- >>>> -- >>>> Post: opend...@googlegroups.com >>>> Unsubscribe: opendatakit...@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...@googlegroups.com. >>>> >>> >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@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...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> >

Hi Malick,

The syntax looks generally correct. You could try splitting it apart into
simpler bits. The error seems quite clear that the jr:choice-name()
function is not supported, so perhaps Kobo and/or Enketo dropped the
support. Try a simple call to jr:choice-name() with a select_one to verify
that theory. Perhaps what you think surely works no longer works.

In any case, you'll need to seek help from the Kobo and/or Enketo teams.

Good luck,

Chris

··· On Thu, Jun 16, 2016 at 5:18 AM KM wrote:

Dear Chris,

Thank you for your reply. I am using it on Kobo toolbox, using the enketo
browser to do data entry. The message is thrown when the form loads in the
browser. Kobo toolbox does support 'jr:choice-name() function' as I have
tested it many times but never used jr:choice-name for multiselect. Is the
following calculation syntax correct:

if(string-length(${I_province}) !=
0,jr:choice-name(selected-at(${I_province}, 0),
'${I_province}'),'(unspecified province)')

Thanks again,

Malick

On Thursday, June 16, 2016 at 11:08:53 AM UTC+2, Christopher Robert wrote:

Hi Malick,

It looks like whatever is giving you that error doesn't support the
jr:choice-name() function. Where do you get the error? Is it converting
your Excel file to XML, validating your XML, or running on Collect? It
seems perhaps an issue with whatever version of software you are running...

Best,

Chris

On Thu, Jun 16, 2016 at 4:57 AM KM kashif....@gmail.com wrote:

Dear Chris,

Do you have an example of using
"jr:choice-name(selected-at(${selectmultfield}, 0), '${selectmultfield}')"
in an XLS form. I have a multi select field 'province' , based on
multi-selection , I want to display corresponding districts , but I am
getting error message using the 'multiselectfield' option.

My code for calculation field is below:
if(string-length(${I_province}) !=
0,jr:choice-name(selected-at(${I_province}, 0),
'${I_province}'),'(unspecified province)')

I get the following error:

  • FormLogicError: Could not evaluate: if(string-length(
    /model/instance[1]/SDR_v0.1/GP2/I_province ) !=
    0,jr:choice-name(selected-at( /model/instance[1]/SDR_v0.1/GP2/I_province ,
    0), ' /SDR_v0.1/GP2/I_province '),'(unspecified province)'), message:
    Function "{http://openrosa.org/javarosa}choice-name" does not exist.

Thank you for your help.

Malick
On Thursday, December 5, 2013 at 11:24:45 AM UTC+1, Christopher Robert wrote:

Hi Evelyn,

I'm glad to hear that SurveyCTO has been useful.

For moving from a value to a label, you can use the jr:choice-name()
function. In this case, you'd have to create a calculate field with
jr:choice-name() in the calculation column, to pull the child's actual name
into a field -- then reference that field in the later label. Our
documentation for jr:choice-name() is:

jr:choice-name(value, 'field'): Returns the label for a select_one or
select_multiple field choice (as in the calculate expression
"jr:choice-name(${selectonefield}, '${selectonefield}')" to return the
label for the currently-selected choice in the selectonefield field). For
select_multiple fields, you can combine with selected-at() to get the label
for individual selections (as in
"jr:choice-name(selected-at(${selectmultfield}, 0), '${selectmultfield}')"
to return the label for the first choice in the selectmultfield field).

This should also work in non-SurveyCTO versions of Collect, though we
recently fixed jr:choice-name() to work properly when referencing a field
with a cascading-select filter. It occurs to me that we haven't shared that
fix back with the community, so if you're filtering the list of names then
jr:choice-name() may fail if you're using ODK Collect. (I'll make sure that
we share this and some other fixes with the community ASAP.)

Best,

Chris

On Thu, Dec 5, 2013 at 5:10 AM, Evelyn Castle < eve...@ehealthnigeria.org> wrote:

Hi Christopher,

Thanks so much for showing me SurveyCTO. It has been a huge help and
we will definitely become a member.

I have an additional question:

Based on the rosters: I have the following 2 questions:

select_one hhmember o1_1 Child's name
select_one ynrd o2_1 Is ${o1_1}’s natural mother alive?
In the questions text, I am seeing the ID number of the person since
the type is a select_one. What I want is to see the person's name.

Can someone let me know how I can do that?

Thanks
Evelyn

On Mon, Nov 25, 2013 at 10:14 PM, Christopher Robert < cro...@surveycto.com> wrote:

Evelyn,

SurveyCTO has a sample form that demonstrates this, and I don't think
that it uses SurveyCTO-only features. If you sign up at
www.surveycto.com, login to your server, click on the Help tab,
click on "Sample Forms" on the left, then click on "Rosters: Choosing among
earlier entries" on the right, you'll see a discussion of the method, be
able to download two variations of the sample, etc.

It won't cost you a dime -- but if you fall in love with SurveyCTO,
we'll ask you to start paying $99 to keep using it beyond 30 days.

Best,

Chris

On Mon, Nov 25, 2013 at 4:06 PM, Evelyn Castle < eve...@ehealthnigeria.org> wrote:

Dear All,

This question is for XLS forms in formhub:

I am looking to make a form that has the following:

  1. Repeating Group:
    1a- Name of Family Member (answers: Amina, Fatima, Zainab)
    1b- Age of family member
    1c- Highest school of family member
    ** End repeat group

  2. Which of the following is the caregiver in the family?
    (select_one)
    options - Amina, Fatima, Zainab

So essentially, the string answers from #1a would show up as options
in #2.

My question is:

  1. Is this possible? And if yes, can you please provide me with an
    example
  2. If it is not possible now, is there someone who can code this for
    me with a deadline of Friday? And if yes, what is the cost?

Thanks and I appreciate your timely response!
Evelyn

--
Evelyn Castle
Director, eHealth Systems Africa
www.eHealthAfrica.org http://www.eHealthNigeria.org
25 Race Course Road, Kano, Ng
mobile: (NG) 0809-515-0585
(US) 714-627-9289

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@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...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@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...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
Evelyn Castle
Director, eHealth Systems Africa
www.eHealthAfrica.org http://www.eHealthNigeria.org
25 Race Course Road, Kano, Ng
mobile: (NG) 0809-515-0585
(US) 714-627-9289

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@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...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
--
Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@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...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
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.

Thanks Chris.

··· On Thursday, June 16, 2016 at 11:26:02 AM UTC+2, Christopher Robert wrote: > > Hi Malick, > > The syntax looks generally correct. You could try splitting it apart into > simpler bits. The error seems quite clear that the jr:choice-name() > function is not supported, so perhaps Kobo and/or Enketo dropped the > support. Try a simple call to jr:choice-name() with a select_one to verify > that theory. Perhaps what you think surely works no longer works. > > In any case, you'll need to seek help from the Kobo and/or Enketo teams. > > Good luck, > > Chris > > On Thu, Jun 16, 2016 at 5:18 AM KM <kashif....@gmail.com > wrote: > >> Dear Chris, >> >> Thank you for your reply. I am using it on Kobo toolbox, using the enketo >> browser to do data entry. The message is thrown when the form loads in the >> browser. Kobo toolbox does support 'jr:choice-name() function' as I have >> tested it many times but never used jr:choice-name for multiselect. Is the >> following calculation syntax correct: >> >> if(string-length(${I_province}) != >> 0,jr:choice-name(selected-at(${I_province}, 0), >> '${I_province}'),'(unspecified province)') >> >> Thanks again, >> >> Malick >> >> >> On Thursday, June 16, 2016 at 11:08:53 AM UTC+2, Christopher Robert wrote: >> >>> Hi Malick, >>> >>> It looks like whatever is giving you that error doesn't support the >>> jr:choice-name() function. Where do you get the error? Is it converting >>> your Excel file to XML, validating your XML, or running on Collect? It >>> seems perhaps an issue with whatever version of software you are running... >>> >>> Best, >>> >>> Chris >>> >>> On Thu, Jun 16, 2016 at 4:57 AM KM wrote: >>> >> Dear Chris, >>>> >>>> Do you have an example of using >>>> "jr:choice-name(selected-at(${selectmultfield}, 0), '${selectmultfield}')" >>>> in an XLS form. I have a multi select field 'province' , based on >>>> multi-selection , I want to display corresponding districts , but I am >>>> getting error message using the 'multiselectfield' option. >>>> >>>> My code for calculation field is below: >>>> if(string-length(${I_province}) != >>>> 0,jr:choice-name(selected-at(${I_province}, 0), >>>> '${I_province}'),'(unspecified province)') >>>> >>>> I get the following error: >>>> >>>> - FormLogicError: Could not evaluate: if(string-length( >>>> /model/instance[1]/SDR_v0.1/GP2/I_province ) != >>>> 0,jr:choice-name(selected-at( /model/instance[1]/SDR_v0.1/GP2/I_province , >>>> 0), ' /SDR_v0.1/GP2/I_province '),'(unspecified province)'), message: >>>> Function "{http://openrosa.org/javarosa}choice-name" does not exist. >>>> >>>> Thank you for your help. >>>> >>>> Malick >>>> On Thursday, December 5, 2013 at 11:24:45 AM UTC+1, Christopher Robert wrote: >>>> >>>>> Hi Evelyn, >>>>> >>>>> I'm glad to hear that SurveyCTO has been useful. >>>>> >>>>> For moving from a value to a label, you can use the jr:choice-name() >>>>> function. In this case, you'd have to create a calculate field with >>>>> jr:choice-name() in the calculation column, to pull the child's actual name >>>>> into a field -- then reference that field in the later label. Our >>>>> documentation for jr:choice-name() is: >>>>> >>>>> jr:choice-name(value, 'field'): Returns the label for a select_one or >>>>> select_multiple field choice (as in the calculate expression >>>>> "jr:choice-name(${selectonefield}, '${selectonefield}')" to return the >>>>> label for the currently-selected choice in the selectonefield field). For >>>>> select_multiple fields, you can combine with selected-at() to get the label >>>>> for individual selections (as in >>>>> "jr:choice-name(selected-at(${selectmultfield}, 0), '${selectmultfield}')" >>>>> to return the label for the first choice in the selectmultfield field). >>>>> >>>>> >>>>> This should also work in non-SurveyCTO versions of Collect, though we >>>>> recently fixed jr:choice-name() to work properly when referencing a field >>>>> with a cascading-select filter. It occurs to me that we haven't shared that >>>>> fix back with the community, so if you're filtering the list of names then >>>>> jr:choice-name() may fail if you're using ODK Collect. (I'll make sure that >>>>> we share this and some other fixes with the community ASAP.) >>>>> >>>>> Best, >>>>> >>>>> Chris >>>>> >>>>> On Thu, Dec 5, 2013 at 5:10 AM, Evelyn Castle < eve...@ehealthnigeria.org> wrote: >>>>> >>>> Hi Christopher, >>>>>> >>>>>> Thanks so much for showing me SurveyCTO. It has been a huge help and >>>>>> we will definitely become a member. >>>>>> >>>>>> I have an additional question: >>>>>> >>>>>> Based on the rosters: I have the following 2 questions: >>>>>> >>>>>> select_one hhmember o1_1 Child's name >>>>>> select_one ynrd o2_1 Is ${o1_1}’s natural mother alive? >>>>>> In the questions text, I am seeing the ID number of the person since >>>>>> the type is a select_one. What I want is to see the person's name. >>>>>> >>>>>> Can someone let me know how I can do that? >>>>>> >>>>>> Thanks >>>>>> Evelyn >>>>>> >>>>> On Mon, Nov 25, 2013 at 10:14 PM, Christopher Robert < cro...@surveycto.com> wrote: >>>>>> >>>>> Evelyn, >>>>>>> >>>>>>> SurveyCTO has a sample form that demonstrates this, and I don't >>>>>>> think that it uses SurveyCTO-only features. If you sign up at >>>>>>> www.surveycto.com, login to your server, click on the Help tab, >>>>>>> click on "Sample Forms" on the left, then click on "Rosters: Choosing among >>>>>>> earlier entries" on the right, you'll see a discussion of the method, be >>>>>>> able to download two variations of the sample, etc. >>>>>>> >>>>>>> It won't cost you a dime -- but if you fall in love with SurveyCTO, >>>>>>> we'll ask you to start paying $99 to keep using it beyond 30 days. >>>>>>> >>>>>>> Best, >>>>>>> >>>>>>> Chris >>>>>>> >>>>>>> On Mon, Nov 25, 2013 at 4:06 PM, Evelyn Castle < eve...@ehealthnigeria.org> wrote: >>>>>>> >>>>>> Dear All, >>>>>>>> >>>>>>>> This question is for XLS forms in formhub: >>>>>>>> >>>>>>>> I am looking to make a form that has the following: >>>>>>>> >>>>>>>> 1. Repeating Group: >>>>>>>> 1a- Name of Family Member (answers: Amina, Fatima, Zainab) >>>>>>>> 1b- Age of family member >>>>>>>> 1c- Highest school of family member >>>>>>>> ** End repeat group >>>>>>>> >>>>>>>> 2. Which of the following is the caregiver in the family? >>>>>>>> (select_one) >>>>>>>> options - Amina, Fatima, Zainab >>>>>>>> >>>>>>>> So essentially, the string answers from #1a would show up as >>>>>>>> options in #2. >>>>>>>> >>>>>>>> My question is: >>>>>>>> 1. Is this possible? And if yes, can you please provide me with an >>>>>>>> example >>>>>>>> 2. If it is not possible now, is there someone who can code this >>>>>>>> for me with a deadline of Friday? And if yes, what is the cost? >>>>>>>> >>>>>>>> Thanks and I appreciate your timely response! >>>>>>>> Evelyn >>>>>>>> >>>>>>>> -- >>>>>>>> Evelyn Castle >>>>>>>> Director, eHealth Systems Africa >>>>>>>> www.eHealthAfrica.org >>>>>>>> 25 Race Course Road, Kano, Ng >>>>>>>> mobile: (NG) 0809-515-0585 >>>>>>>> (US) 714-627-9289 >>>>>>>> >>>>>>>> -- >>>>>>>> -- >>>>>>>> Post: opend...@googlegroups.com >>>>>>>> Unsubscribe: opendatakit...@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...@googlegroups.com. >>>>>>> >>>>>>> >>>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>>> >>>>>>> >>>>>>> -- >>>>>>> -- >>>>>>> Post: opend...@googlegroups.com >>>>>>> Unsubscribe: opendatakit...@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...@googlegroups.com. >>>>>> >>>>>> >>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Evelyn Castle >>>>>> Director, eHealth Systems Africa >>>>>> www.eHealthAfrica.org >>>>>> 25 Race Course Road, Kano, Ng >>>>>> mobile: (NG) 0809-515-0585 >>>>>> (US) 714-627-9289 >>>>>> >>>>>> -- >>>>>> -- >>>>>> Post: opend...@googlegroups.com >>>>>> Unsubscribe: opendatakit...@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...@googlegroups.com. >>>>>> >>>>> >>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>> >>>>> -- >>>> -- >>>> Post: opend...@googlegroups.com >>>> Unsubscribe: opendatakit...@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...@googlegroups.com. >>>> >>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@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...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> >