Calculations on select multiple

Hi,

I am designing a questionnaire in which for every question there are some
marks. In this questionnaire, one question has multiple options and user
can select any number of options. On the basis of his/her selection I need
to calculate the score e.g.

I had asked "Have any of your blood relatives ever been diagnosed with
diabetes? (Check ALL that apply)" and options are

  1. Mother (2 points)
  2. Father (2 points)
  3. Brothers/Sister (2 points)
  4. Children (2 points)
  5. Other (0 point)
  6. No/don't know (0 point)

Now suppose user chooses 2 options from above i.e. Mother and Children then
his/her score should be 4.

How I can achieve it? I am using XLSForms.

Regards, Naveen
World Health Organization, India.

Naveen,

See http://xlsform.org/#calculation

Yaw

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal naveagar@gmail.com wrote:

Hi,

I am designing a questionnaire in which for every question there are some
marks. In this questionnaire, one question has multiple options and user can
select any number of options. On the basis of his/her selection I need to
calculate the score e.g.

I had asked "Have any of your blood relatives ever been diagnosed with
diabetes? (Check ALL that apply)" and options are

  1. Mother (2 points)
  2. Father (2 points)
  3. Brothers/Sister (2 points)
  4. Children (2 points)
  5. Other (0 point)
  6. No/don't know (0 point)

Now suppose user chooses 2 options from above i.e. Mother and Children then
his/her score should be 4.

How I can achieve it? I am using XLSForms.

Regards, Naveen
World Health Organization, India.

--

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

I had seen it not able to use it as need to read each values for select
multiple.

ยทยทยท On Aug 30, 2015 6:12 PM, "Yaw Anokwa" wrote:

Naveen,

See http://xlsform.org/#calculation

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal naveagar@gmail.com wrote:

Hi,

I am designing a questionnaire in which for every question there are some
marks. In this questionnaire, one question has multiple options and user
can
select any number of options. On the basis of his/her selection I need to
calculate the score e.g.

I had asked "Have any of your blood relatives ever been diagnosed with
diabetes? (Check ALL that apply)" and options are

  1. Mother (2 points)
  2. Father (2 points)
  3. Brothers/Sister (2 points)
  4. Children (2 points)
  5. Other (0 point)
  6. No/don't know (0 point)

Now suppose user chooses 2 options from above i.e. Mother and Children
then
his/her score should be 4.

How I can achieve it? I am using XLSForms.

Regards, Naveen
World Health Organization, India.

--

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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oh, it's a select_multiple. Try using selected-at (see
https://opendatakit.org/help/form-design/binding/) to get the values
at 1-6 and then add them up that way.

Yaw

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 9:20 AM, Naveen Agarwal naveagar@gmail.com wrote:

Thanks Yaw.

I had seen it not able to use it as need to read each values for select
multiple.

On Aug 30, 2015 6:12 PM, "Yaw Anokwa" yanokwa@nafundi.com wrote:

Naveen,

See http://xlsform.org/#calculation

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal naveagar@gmail.com wrote:

Hi,

I am designing a questionnaire in which for every question there are
some
marks. In this questionnaire, one question has multiple options and user
can
select any number of options. On the basis of his/her selection I need
to
calculate the score e.g.

I had asked "Have any of your blood relatives ever been diagnosed with
diabetes? (Check ALL that apply)" and options are

  1. Mother (2 points)
  2. Father (2 points)
  3. Brothers/Sister (2 points)
  4. Children (2 points)
  5. Other (0 point)
  6. No/don't know (0 point)

Now suppose user chooses 2 options from above i.e. Mother and Children
then
his/her score should be 4.

How I can achieve it? I am using XLSForms.

Regards, Naveen
World Health Organization, India.

--

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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@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 Yaw again for this.
Actually I am using XLSForms and not able to get the proper result as may
be not using it properly.
Please help.

ยทยทยท On Aug 30, 2015 8:01 PM, "Yaw Anokwa" wrote:

Oh, it's a select_multiple. Try using selected-at (see
https://opendatakit.org/help/form-design/binding/) to get the values
at 1-6 and then add them up that way.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 9:20 AM, Naveen Agarwal naveagar@gmail.com wrote:

Thanks Yaw.

I had seen it not able to use it as need to read each values for select
multiple.

On Aug 30, 2015 6:12 PM, "Yaw Anokwa" yanokwa@nafundi.com wrote:

Naveen,

See http://xlsform.org/#calculation

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal naveagar@gmail.com wrote:

Hi,

I am designing a questionnaire in which for every question there are
some
marks. In this questionnaire, one question has multiple options and
user

can
select any number of options. On the basis of his/her selection I need
to
calculate the score e.g.

I had asked "Have any of your blood relatives ever been diagnosed with
diabetes? (Check ALL that apply)" and options are

  1. Mother (2 points)
  2. Father (2 points)
  3. Brothers/Sister (2 points)
  4. Children (2 points)
  5. Other (0 point)
  6. No/don't know (0 point)

Now suppose user chooses 2 options from above i.e. Mother and Children
then
his/her score should be 4.

How I can achieve it? I am using XLSForms.

Regards, Naveen
World Health Organization, India.

--

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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Naveen,

Attached is an example.

Yaw

sum.xlsx (10.8 KB)

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 10:54 AM, Naveen Agarwal naveagar@gmail.com wrote:

Thanks Yaw again for this.
Actually I am using XLSForms and not able to get the proper result as may be
not using it properly.
Please help.

On Aug 30, 2015 8:01 PM, "Yaw Anokwa" yanokwa@nafundi.com wrote:

Oh, it's a select_multiple. Try using selected-at (see
https://opendatakit.org/help/form-design/binding/) to get the values
at 1-6 and then add them up that way.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 9:20 AM, Naveen Agarwal naveagar@gmail.com wrote:

Thanks Yaw.

I had seen it not able to use it as need to read each values for select
multiple.

On Aug 30, 2015 6:12 PM, "Yaw Anokwa" yanokwa@nafundi.com wrote:

Naveen,

See http://xlsform.org/#calculation

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal naveagar@gmail.com wrote:

Hi,

I am designing a questionnaire in which for every question there are
some
marks. In this questionnaire, one question has multiple options and
user
can
select any number of options. On the basis of his/her selection I
need
to
calculate the score e.g.

I had asked "Have any of your blood relatives ever been diagnosed
with
diabetes? (Check ALL that apply)" and options are

  1. Mother (2 points)
  2. Father (2 points)
  3. Brothers/Sister (2 points)
  4. Children (2 points)
  5. Other (0 point)
  6. No/don't know (0 point)

Now suppose user chooses 2 options from above i.e. Mother and
Children
then
his/her score should be 4.

How I can achieve it? I am using XLSForms.

Regards, Naveen
World Health Organization, India.

--

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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@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.

1 Like

Thanks Swapnil for your response.

*Yaw, you are always rocks. *

*Thanks a lot, it is same as required. *

ยทยทยท On Monday, August 31, 2015 at 1:29:54 AM UTC+5:30, Yaw Anokwa wrote: > > Naveen, > > Attached is an example. > > Yaw > -- > Need ODK services? http://nafundi.com provides form design, server > setup, professional support, and software development for ODK. > > On Sun, Aug 30, 2015 at 10:54 AM, Naveen Agarwal <nave...@gmail.com > wrote: > > Thanks Yaw again for this. > > Actually I am using XLSForms and not able to get the proper result as > may be > > not using it properly. > > Please help. > > > > On Aug 30, 2015 8:01 PM, "Yaw Anokwa" <yan...@nafundi.com > wrote: > >> > >> Oh, it's a select_multiple. Try using selected-at (see > >> https://opendatakit.org/help/form-design/binding/) to get the values > >> at 1-6 and then add them up that way. > >> > >> Yaw > >> -- > >> Need ODK services? http://nafundi.com provides form design, server > >> setup, professional support, and software development for ODK. > >> > >> > >> On Sun, Aug 30, 2015 at 9:20 AM, Naveen Agarwal <nave...@gmail.com > wrote: > >> > Thanks Yaw. > >> > > >> > I had seen it not able to use it as need to read each values for > select > >> > multiple. > >> > > >> > On Aug 30, 2015 6:12 PM, "Yaw Anokwa" <yan...@nafundi.com > wrote: > >> >> > >> >> Naveen, > >> >> > >> >> See http://xlsform.org/#calculation > >> >> > >> >> Yaw > >> >> -- > >> >> Need ODK services? http://nafundi.com provides form design, server > >> >> setup, professional support, and software development for ODK. > >> >> > >> >> On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal <nave...@gmail.com > wrote: > >> >> > Hi, > >> >> > > >> >> > I am designing a questionnaire in which for every question there > are > >> >> > some > >> >> > marks. In this questionnaire, one question has multiple options > and > >> >> > user > >> >> > can > >> >> > select any number of options. On the basis of his/her selection I > >> >> > need > >> >> > to > >> >> > calculate the score e.g. > >> >> > > >> >> > I had asked "Have any of your blood relatives ever been diagnosed > >> >> > with > >> >> > diabetes? (Check ALL that apply)" and options are > >> >> > > >> >> > 1. Mother (2 points) > >> >> > 2. Father (2 points) > >> >> > 3. Brothers/Sister (2 points) > >> >> > 4. Children (2 points) > >> >> > 5. Other (0 point) > >> >> > 6. No/don't know (0 point) > >> >> > > >> >> > Now suppose user chooses 2 options from above i.e. Mother and > >> >> > Children > >> >> > then > >> >> > his/her score should be 4. > >> >> > > >> >> > How I can achieve it? I am using XLSForms. > >> >> > > >> >> > Regards, Naveen > >> >> > World Health Organization, India. > >> >> > > >> >> > -- > >> >> > -- > >> >> > 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 a topic in > the > >> >> Google Groups "ODK Community" group. > >> >> To unsubscribe from this topic, visit > >> >> > https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe. > >> >> To unsubscribe from this group and all its topics, 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. > >> > >> -- > >> -- > >> 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 a topic in the > >> Google Groups "ODK Community" group. > >> To unsubscribe from this topic, visit > >> https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe. > >> To unsubscribe from this group and all its topics, 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. >

I am trying with selected-at in XLSforms but not getting the exact
position. I don't know where is I am wrong

Code is

select_multiple fam family Have any of your blood relatives ever been
diagnosed with diabetes? (Check ALL that apply)

calculate c1 if(selected-at(${family},0),2,0)
calculate c2 if(selected-at(${family},1),2,0)
calculate c3 if(selected-at(${family},2),2,0)
calculate c4 if(selected-at(${family},3),2,0)
calculate c5 if(selected-at(${family},4),0,0)
calculate c6 if(selected-at(${family},5),0,0)
calculate fam_tot ${c1} + ${c2} + ${c3} + ${c4} + ${c5} + ${c6}

In any of above selection it takes c1 i.e. if I am selecting 5 option then
also score is coming in c1 instead of c5

Excel is also attached.

DIABETES.xls (37.5 KB)

ยทยทยท On Monday, August 31, 2015 at 9:22:41 AM UTC+5:30, Naveen Agarwal wrote: > > Thanks Swapnil for your response. > > *Yaw, you are always rocks. * > > *Thanks a lot, it is same as required. * > > > > > On Monday, August 31, 2015 at 1:29:54 AM UTC+5:30, Yaw Anokwa wrote: >> >> Naveen, >> >> Attached is an example. >> >> Yaw >> -- >> Need ODK services? http://nafundi.com provides form design, server >> setup, professional support, and software development for ODK. >> >> On Sun, Aug 30, 2015 at 10:54 AM, Naveen Agarwal wrote: >> > Thanks Yaw again for this. >> > Actually I am using XLSForms and not able to get the proper result as >> may be >> > not using it properly. >> > Please help. >> > >> > On Aug 30, 2015 8:01 PM, "Yaw Anokwa" wrote: >> >> >> >> Oh, it's a select_multiple. Try using selected-at (see >> >> https://opendatakit.org/help/form-design/binding/) to get the values >> >> at 1-6 and then add them up that way. >> >> >> >> Yaw >> >> -- >> >> Need ODK services? http://nafundi.com provides form design, server >> >> setup, professional support, and software development for ODK. >> >> >> >> >> >> On Sun, Aug 30, 2015 at 9:20 AM, Naveen Agarwal wrote: >> >> > Thanks Yaw. >> >> > >> >> > I had seen it not able to use it as need to read each values for >> select >> >> > multiple. >> >> > >> >> > On Aug 30, 2015 6:12 PM, "Yaw Anokwa" wrote: >> >> >> >> >> >> Naveen, >> >> >> >> >> >> See http://xlsform.org/#calculation >> >> >> >> >> >> Yaw >> >> >> -- >> >> >> Need ODK services? http://nafundi.com provides form design, server >> >> >> setup, professional support, and software development for ODK. >> >> >> >> >> >> On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal wrote: >> >> >> > Hi, >> >> >> > >> >> >> > I am designing a questionnaire in which for every question there >> are >> >> >> > some >> >> >> > marks. In this questionnaire, one question has multiple options >> and >> >> >> > user >> >> >> > can >> >> >> > select any number of options. On the basis of his/her selection I >> >> >> > need >> >> >> > to >> >> >> > calculate the score e.g. >> >> >> > >> >> >> > I had asked "Have any of your blood relatives ever been diagnosed >> >> >> > with >> >> >> > diabetes? (Check ALL that apply)" and options are >> >> >> > >> >> >> > 1. Mother (2 points) >> >> >> > 2. Father (2 points) >> >> >> > 3. Brothers/Sister (2 points) >> >> >> > 4. Children (2 points) >> >> >> > 5. Other (0 point) >> >> >> > 6. No/don't know (0 point) >> >> >> > >> >> >> > Now suppose user chooses 2 options from above i.e. Mother and >> >> >> > Children >> >> >> > then >> >> >> > his/her score should be 4. >> >> >> > >> >> >> > How I can achieve it? I am using XLSForms. >> >> >> > >> >> >> > Regards, Naveen >> >> >> > World Health Organization, India. >> >> >> > >> >> >> > -- >> >> >> > -- >> >> >> > 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 a topic in >> the >> >> >> Google Groups "ODK Community" group. >> >> >> To unsubscribe from this topic, visit >> >> >> >> https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe. >> >> >> To unsubscribe from this group and all its topics, 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. >> >> >> >> -- >> >> -- >> >> 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 a topic in the >> >> Google Groups "ODK Community" group. >> >> To unsubscribe from this topic, visit >> >> https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe. >> >> >> To unsubscribe from this group and all its topics, 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. >> >

Naveen,

The behavior you are seeing is normal. selected-at only selects from
the chosen answers. If you choose 3 items then only c1, c2, and c3
will be filled.

Yaw

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Wed, Sep 2, 2015 at 12:01 AM, Naveen Agarwal naveagar@gmail.com wrote:

I am trying with selected-at in XLSforms but not getting the exact position.
I don't know where is I am wrong

Code is

select_multiple fam family Have any of your blood relatives ever been
diagnosed with diabetes? (Check ALL that apply)

calculate c1 if(selected-at(${family},0),2,0)
calculate c2 if(selected-at(${family},1),2,0)
calculate c3 if(selected-at(${family},2),2,0)
calculate c4 if(selected-at(${family},3),2,0)
calculate c5 if(selected-at(${family},4),0,0)
calculate c6 if(selected-at(${family},5),0,0)
calculate fam_tot ${c1} + ${c2} + ${c3} + ${c4} + ${c5} + ${c6}

In any of above selection it takes c1 i.e. if I am selecting 5 option then
also score is coming in c1 instead of c5

Excel is also attached.

On Monday, August 31, 2015 at 9:22:41 AM UTC+5:30, Naveen Agarwal wrote:

Thanks Swapnil for your response.

Yaw, you are always rocks.

Thanks a lot, it is same as required.

On Monday, August 31, 2015 at 1:29:54 AM UTC+5:30, Yaw Anokwa wrote:

Naveen,

Attached is an example.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 10:54 AM, Naveen Agarwal nave...@gmail.com wrote:

Thanks Yaw again for this.
Actually I am using XLSForms and not able to get the proper result as
may be
not using it properly.
Please help.

On Aug 30, 2015 8:01 PM, "Yaw Anokwa" yan...@nafundi.com wrote:

Oh, it's a select_multiple. Try using selected-at (see
https://opendatakit.org/help/form-design/binding/) to get the values
at 1-6 and then add them up that way.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 9:20 AM, Naveen Agarwal nave...@gmail.com wrote:

Thanks Yaw.

I had seen it not able to use it as need to read each values for
select
multiple.

On Aug 30, 2015 6:12 PM, "Yaw Anokwa" yan...@nafundi.com wrote:

Naveen,

See http://xlsform.org/#calculation

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal nave...@gmail.com wrote:

Hi,

I am designing a questionnaire in which for every question there
are
some
marks. In this questionnaire, one question has multiple options
and
user
can
select any number of options. On the basis of his/her selection I
need
to
calculate the score e.g.

I had asked "Have any of your blood relatives ever been diagnosed
with
diabetes? (Check ALL that apply)" and options are

  1. Mother (2 points)
  2. Father (2 points)
  3. Brothers/Sister (2 points)
  4. Children (2 points)
  5. Other (0 point)
  6. No/don't know (0 point)

Now suppose user chooses 2 options from above i.e. Mother and
Children
then
his/her score should be 4.

How I can achieve it? I am using XLSForms.

Regards, Naveen
World Health Organization, India.

--

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 a topic in
the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit

https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, 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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, 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.

--

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.

I am sorry, I think I was not enough clear. Actually whatever I choose
value comes in C1 not in that which I am choosing.

Yaw, I would appreciate it you could run the excel to see actual result.
Regards, Naveen
World Health Organization

ยทยทยท On Sep 2, 2015 9:02 PM, "Yaw Anokwa" wrote:

Naveen,

The behavior you are seeing is normal. selected-at only selects from
the chosen answers. If you choose 3 items then only c1, c2, and c3
will be filled.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Wed, Sep 2, 2015 at 12:01 AM, Naveen Agarwal naveagar@gmail.com wrote:

I am trying with selected-at in XLSforms but not getting the exact
position.
I don't know where is I am wrong

Code is

select_multiple fam family Have any of your blood relatives ever been
diagnosed with diabetes? (Check ALL that apply)

calculate c1 if(selected-at(${family},0),2,0)
calculate c2 if(selected-at(${family},1),2,0)
calculate c3 if(selected-at(${family},2),2,0)
calculate c4 if(selected-at(${family},3),2,0)
calculate c5 if(selected-at(${family},4),0,0)
calculate c6 if(selected-at(${family},5),0,0)
calculate fam_tot ${c1} + ${c2} + ${c3} + ${c4} + ${c5} + ${c6}

In any of above selection it takes c1 i.e. if I am selecting 5 option
then
also score is coming in c1 instead of c5

Excel is also attached.

On Monday, August 31, 2015 at 9:22:41 AM UTC+5:30, Naveen Agarwal wrote:

Thanks Swapnil for your response.

Yaw, you are always rocks.

Thanks a lot, it is same as required.

On Monday, August 31, 2015 at 1:29:54 AM UTC+5:30, Yaw Anokwa wrote:

Naveen,

Attached is an example.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 10:54 AM, Naveen Agarwal nave...@gmail.com wrote:

Thanks Yaw again for this.
Actually I am using XLSForms and not able to get the proper result as
may be
not using it properly.
Please help.

On Aug 30, 2015 8:01 PM, "Yaw Anokwa" yan...@nafundi.com wrote:

Oh, it's a select_multiple. Try using selected-at (see
https://opendatakit.org/help/form-design/binding/) to get the
values

at 1-6 and then add them up that way.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 9:20 AM, Naveen Agarwal nave...@gmail.com wrote:

Thanks Yaw.

I had seen it not able to use it as need to read each values for
select
multiple.

On Aug 30, 2015 6:12 PM, "Yaw Anokwa" yan...@nafundi.com wrote:

Naveen,

See http://xlsform.org/#calculation

Yaw

Need ODK services? http://nafundi.com provides form design,
server

setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal < nave...@gmail.com> wrote:

Hi,

I am designing a questionnaire in which for every question
there

are
some
marks. In this questionnaire, one question has multiple options
and
user
can
select any number of options. On the basis of his/her
selection I

need
to
calculate the score e.g.

I had asked "Have any of your blood relatives ever been
diagnosed

with
diabetes? (Check ALL that apply)" and options are

  1. Mother (2 points)
  2. Father (2 points)
  3. Brothers/Sister (2 points)
  4. Children (2 points)
  5. Other (0 point)
  6. No/don't know (0 point)

Now suppose user chooses 2 options from above i.e. Mother and
Children
then
his/her score should be 4.

How I can achieve it? I am using XLSForms.

Regards, Naveen
World Health Organization, India.

--

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 a topic
in

the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit

https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.

To unsubscribe from this group and all its topics, 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.

--

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 a topic in
the

Google Groups "ODK Community" group.
To unsubscribe from this topic, visit

https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.

To unsubscribe from this group and all its topics, 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.

--

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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Naveen,

Does the example I showed you earlier do what you wanted? If is, use
that as a template.

Yaw

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Wed, Sep 2, 2015 at 12:10 PM, Naveen Agarwal naveagar@gmail.com wrote:

I am sorry, I think I was not enough clear. Actually whatever I choose value
comes in C1 not in that which I am choosing.

Yaw, I would appreciate it you could run the excel to see actual result.
Regards, Naveen
World Health Organization

On Sep 2, 2015 9:02 PM, "Yaw Anokwa" yanokwa@nafundi.com wrote:

Naveen,

The behavior you are seeing is normal. selected-at only selects from
the chosen answers. If you choose 3 items then only c1, c2, and c3
will be filled.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Wed, Sep 2, 2015 at 12:01 AM, Naveen Agarwal naveagar@gmail.com wrote:

I am trying with selected-at in XLSforms but not getting the exact
position.
I don't know where is I am wrong

Code is

select_multiple fam family Have any of your blood relatives ever been
diagnosed with diabetes? (Check ALL that apply)

calculate c1 if(selected-at(${family},0),2,0)
calculate c2 if(selected-at(${family},1),2,0)
calculate c3 if(selected-at(${family},2),2,0)
calculate c4 if(selected-at(${family},3),2,0)
calculate c5 if(selected-at(${family},4),0,0)
calculate c6 if(selected-at(${family},5),0,0)
calculate fam_tot ${c1} + ${c2} + ${c3} + ${c4} + ${c5} + ${c6}

In any of above selection it takes c1 i.e. if I am selecting 5 option
then
also score is coming in c1 instead of c5

Excel is also attached.

On Monday, August 31, 2015 at 9:22:41 AM UTC+5:30, Naveen Agarwal wrote:

Thanks Swapnil for your response.

Yaw, you are always rocks.

Thanks a lot, it is same as required.

On Monday, August 31, 2015 at 1:29:54 AM UTC+5:30, Yaw Anokwa wrote:

Naveen,

Attached is an example.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 10:54 AM, Naveen Agarwal nave...@gmail.com wrote:

Thanks Yaw again for this.
Actually I am using XLSForms and not able to get the proper result
as
may be
not using it properly.
Please help.

On Aug 30, 2015 8:01 PM, "Yaw Anokwa" yan...@nafundi.com wrote:

Oh, it's a select_multiple. Try using selected-at (see
https://opendatakit.org/help/form-design/binding/) to get the
values
at 1-6 and then add them up that way.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 9:20 AM, Naveen Agarwal nave...@gmail.com wrote:

Thanks Yaw.

I had seen it not able to use it as need to read each values for
select
multiple.

On Aug 30, 2015 6:12 PM, "Yaw Anokwa" yan...@nafundi.com wrote:

Naveen,

See http://xlsform.org/#calculation

Yaw

Need ODK services? http://nafundi.com provides form design,
server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal nave...@gmail.com wrote:

Hi,

I am designing a questionnaire in which for every question
there
are
some
marks. In this questionnaire, one question has multiple
options
and
user
can
select any number of options. On the basis of his/her
selection I
need
to
calculate the score e.g.

I had asked "Have any of your blood relatives ever been
diagnosed
with
diabetes? (Check ALL that apply)" and options are

  1. Mother (2 points)
  2. Father (2 points)
  3. Brothers/Sister (2 points)
  4. Children (2 points)
  5. Other (0 point)
  6. No/don't know (0 point)

Now suppose user chooses 2 options from above i.e. Mother and
Children
then
his/her score should be 4.

How I can achieve it? I am using XLSForms.

Regards, Naveen
World Health Organization, India.

--

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 a topic
in
the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit

https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, 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.

--

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 a topic in
the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit

https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, 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.

--

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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@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.

Yes, that was working. But there is a problem as out of 6 multiple answers,
4 having same score i.e. 2 so if someone choose option 1 or 2 and come back
on the same question again after swipe then all four options automatically
checked. How I can prevent this issue?

ยทยทยท On Sep 2, 2015 9:47 PM, "Yaw Anokwa" wrote:

Naveen,

Does the example I showed you earlier do what you wanted? If is, use
that as a template.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Wed, Sep 2, 2015 at 12:10 PM, Naveen Agarwal naveagar@gmail.com wrote:

I am sorry, I think I was not enough clear. Actually whatever I choose
value
comes in C1 not in that which I am choosing.

Yaw, I would appreciate it you could run the excel to see actual result.
Regards, Naveen
World Health Organization

On Sep 2, 2015 9:02 PM, "Yaw Anokwa" yanokwa@nafundi.com wrote:

Naveen,

The behavior you are seeing is normal. selected-at only selects from
the chosen answers. If you choose 3 items then only c1, c2, and c3
will be filled.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Wed, Sep 2, 2015 at 12:01 AM, Naveen Agarwal naveagar@gmail.com wrote:

I am trying with selected-at in XLSforms but not getting the exact
position.
I don't know where is I am wrong

Code is

select_multiple fam family Have any of your blood relatives ever been
diagnosed with diabetes? (Check ALL that apply)

calculate c1 if(selected-at(${family},0),2,0)
calculate c2 if(selected-at(${family},1),2,0)
calculate c3 if(selected-at(${family},2),2,0)
calculate c4 if(selected-at(${family},3),2,0)
calculate c5 if(selected-at(${family},4),0,0)
calculate c6 if(selected-at(${family},5),0,0)
calculate fam_tot ${c1} + ${c2} + ${c3} + ${c4} + ${c5} + ${c6}

In any of above selection it takes c1 i.e. if I am selecting 5 option
then
also score is coming in c1 instead of c5

Excel is also attached.

On Monday, August 31, 2015 at 9:22:41 AM UTC+5:30, Naveen Agarwal wrote:

Thanks Swapnil for your response.

Yaw, you are always rocks.

Thanks a lot, it is same as required.

On Monday, August 31, 2015 at 1:29:54 AM UTC+5:30, Yaw Anokwa wrote:

Naveen,

Attached is an example.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 10:54 AM, Naveen Agarwal <nave...@gmail.com wrote:

Thanks Yaw again for this.
Actually I am using XLSForms and not able to get the proper result
as
may be
not using it properly.
Please help.

On Aug 30, 2015 8:01 PM, "Yaw Anokwa" yan...@nafundi.com wrote:

Oh, it's a select_multiple. Try using selected-at (see
https://opendatakit.org/help/form-design/binding/) to get the
values
at 1-6 and then add them up that way.

Yaw

Need ODK services? http://nafundi.com provides form design,
server

setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 9:20 AM, Naveen Agarwal < nave...@gmail.com> wrote:

Thanks Yaw.

I had seen it not able to use it as need to read each values
for

select
multiple.

On Aug 30, 2015 6:12 PM, "Yaw Anokwa" yan...@nafundi.com wrote:

Naveen,

See http://xlsform.org/#calculation

Yaw

Need ODK services? http://nafundi.com provides form design,
server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal nave...@gmail.com wrote:

Hi,

I am designing a questionnaire in which for every question
there
are
some
marks. In this questionnaire, one question has multiple
options
and
user
can
select any number of options. On the basis of his/her
selection I
need
to
calculate the score e.g.

I had asked "Have any of your blood relatives ever been
diagnosed
with
diabetes? (Check ALL that apply)" and options are

  1. Mother (2 points)
  2. Father (2 points)
  3. Brothers/Sister (2 points)
  4. Children (2 points)
  5. Other (0 point)
  6. No/don't know (0 point)

Now suppose user chooses 2 options from above i.e. Mother
and

Children
then
his/her score should be 4.

How I can achieve it? I am using XLSForms.

Regards, Naveen
World Health Organization, India.

--

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 a
topic

in
the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit

https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.

To unsubscribe from this group and all its topics, 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.

--

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 a topic
in

the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit

https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.

To unsubscribe from this group and all its topics, 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.

--

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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Naveen,

Names (what gets saved into the form) have to be unique, so I'd make
the names unique by adding a insignificant digits, then round the
total.

Attached is an example.

Yaw

sum.xlsx (10.9 KB)

ยทยทยท On Wed, Sep 2, 2015 at 12:32 PM, Naveen Agarwal wrote: > Yes, that was working. But there is a problem as out of 6 multiple answers, > 4 having same score i.e. 2 so if someone choose option 1 or 2 and come back > on the same question again after swipe then all four options automatically > checked. How I can prevent this issue? > > On Sep 2, 2015 9:47 PM, "Yaw Anokwa" wrote: >> >> Naveen, >> >> Does the example I showed you earlier do what you wanted? If is, use >> that as a template. >> >> Yaw >> -- >> Need ODK services? http://nafundi.com provides form design, server >> setup, professional support, and software development for ODK. >> >> On Wed, Sep 2, 2015 at 12:10 PM, Naveen Agarwal wrote: >> > I am sorry, I think I was not enough clear. Actually whatever I choose >> > value >> > comes in C1 not in that which I am choosing. >> > >> > Yaw, I would appreciate it you could run the excel to see actual result. >> > Regards, Naveen >> > World Health Organization >> > >> > On Sep 2, 2015 9:02 PM, "Yaw Anokwa" wrote: >> >> >> >> Naveen, >> >> >> >> The behavior you are seeing is normal. selected-at only selects from >> >> the chosen answers. If you choose 3 items then only c1, c2, and c3 >> >> will be filled. >> >> >> >> Yaw >> >> -- >> >> Need ODK services? http://nafundi.com provides form design, server >> >> setup, professional support, and software development for ODK. >> >> >> >> On Wed, Sep 2, 2015 at 12:01 AM, Naveen Agarwal wrote: >> >> > I am trying with selected-at in XLSforms but not getting the exact >> >> > position. >> >> > I don't know where is I am wrong >> >> > >> >> > Code is >> >> > >> >> > select_multiple fam family Have any of your blood relatives ever been >> >> > diagnosed with diabetes? (Check ALL that apply) >> >> > >> >> > calculate c1 if(selected-at(${family},0),2,0) >> >> > calculate c2 if(selected-at(${family},1),2,0) >> >> > calculate c3 if(selected-at(${family},2),2,0) >> >> > calculate c4 if(selected-at(${family},3),2,0) >> >> > calculate c5 if(selected-at(${family},4),0,0) >> >> > calculate c6 if(selected-at(${family},5),0,0) >> >> > calculate fam_tot ${c1} + ${c2} + ${c3} + ${c4} + ${c5} + ${c6} >> >> > >> >> > In any of above selection it takes c1 i.e. if I am selecting 5 option >> >> > then >> >> > also score is coming in c1 instead of c5 >> >> > >> >> > Excel is also attached. >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > On Monday, August 31, 2015 at 9:22:41 AM UTC+5:30, Naveen Agarwal wrote: >> >> >> >> >> >> Thanks Swapnil for your response. >> >> >> >> >> >> Yaw, you are always rocks. >> >> >> >> >> >> Thanks a lot, it is same as required. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> On Monday, August 31, 2015 at 1:29:54 AM UTC+5:30, Yaw Anokwa wrote: >> >> >>> >> >> >>> Naveen, >> >> >>> >> >> >>> Attached is an example. >> >> >>> >> >> >>> Yaw >> >> >>> -- >> >> >>> Need ODK services? http://nafundi.com provides form design, server >> >> >>> setup, professional support, and software development for ODK. >> >> >>> >> >> >>> On Sun, Aug 30, 2015 at 10:54 AM, Naveen Agarwal wrote: >> >> >>> > Thanks Yaw again for this. >> >> >>> > Actually I am using XLSForms and not able to get the proper >> >> >>> > result >> >> >>> > as >> >> >>> > may be >> >> >>> > not using it properly. >> >> >>> > Please help. >> >> >>> > >> >> >>> > On Aug 30, 2015 8:01 PM, "Yaw Anokwa" wrote: >> >> >>> >> >> >> >>> >> Oh, it's a select_multiple. Try using selected-at (see >> >> >>> >> https://opendatakit.org/help/form-design/binding/) to get the >> >> >>> >> values >> >> >>> >> at 1-6 and then add them up that way. >> >> >>> >> >> >> >>> >> Yaw >> >> >>> >> -- >> >> >>> >> Need ODK services? http://nafundi.com provides form design, >> >> >>> >> server >> >> >>> >> setup, professional support, and software development for ODK. >> >> >>> >> >> >> >>> >> >> >> >>> >> On Sun, Aug 30, 2015 at 9:20 AM, Naveen Agarwal wrote: >> >> >>> >> > Thanks Yaw. >> >> >>> >> > >> >> >>> >> > I had seen it not able to use it as need to read each values >> >> >>> >> > for >> >> >>> >> > select >> >> >>> >> > multiple. >> >> >>> >> > >> >> >>> >> > On Aug 30, 2015 6:12 PM, "Yaw Anokwa" wrote: >> >> >>> >> >> >> >> >>> >> >> Naveen, >> >> >>> >> >> >> >> >>> >> >> See http://xlsform.org/#calculation >> >> >>> >> >> >> >> >>> >> >> Yaw >> >> >>> >> >> -- >> >> >>> >> >> Need ODK services? http://nafundi.com provides form design, >> >> >>> >> >> server >> >> >>> >> >> setup, professional support, and software development for >> >> >>> >> >> ODK. >> >> >>> >> >> >> >> >>> >> >> On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal wrote: >> >> >>> >> >> > Hi, >> >> >>> >> >> > >> >> >>> >> >> > I am designing a questionnaire in which for every question >> >> >>> >> >> > there >> >> >>> >> >> > are >> >> >>> >> >> > some >> >> >>> >> >> > marks. In this questionnaire, one question has multiple >> >> >>> >> >> > options >> >> >>> >> >> > and >> >> >>> >> >> > user >> >> >>> >> >> > can >> >> >>> >> >> > select any number of options. On the basis of his/her >> >> >>> >> >> > selection I >> >> >>> >> >> > need >> >> >>> >> >> > to >> >> >>> >> >> > calculate the score e.g. >> >> >>> >> >> > >> >> >>> >> >> > I had asked "Have any of your blood relatives ever been >> >> >>> >> >> > diagnosed >> >> >>> >> >> > with >> >> >>> >> >> > diabetes? (Check ALL that apply)" and options are >> >> >>> >> >> > >> >> >>> >> >> > 1. Mother (2 points) >> >> >>> >> >> > 2. Father (2 points) >> >> >>> >> >> > 3. Brothers/Sister (2 points) >> >> >>> >> >> > 4. Children (2 points) >> >> >>> >> >> > 5. Other (0 point) >> >> >>> >> >> > 6. No/don't know (0 point) >> >> >>> >> >> > >> >> >>> >> >> > Now suppose user chooses 2 options from above i.e. Mother >> >> >>> >> >> > and >> >> >>> >> >> > Children >> >> >>> >> >> > then >> >> >>> >> >> > his/her score should be 4. >> >> >>> >> >> > >> >> >>> >> >> > How I can achieve it? I am using XLSForms. >> >> >>> >> >> > >> >> >>> >> >> > Regards, Naveen >> >> >>> >> >> > World Health Organization, India. >> >> >>> >> >> > >> >> >>> >> >> > -- >> >> >>> >> >> > -- >> >> >>> >> >> > 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 a >> >> >>> >> >> topic >> >> >>> >> >> in >> >> >>> >> >> the >> >> >>> >> >> Google Groups "ODK Community" group. >> >> >>> >> >> To unsubscribe from this topic, visit >> >> >>> >> >> >> >> >>> >> >> >> >> >>> >> >> >> >> >>> >> >> https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe. >> >> >>> >> >> To unsubscribe from this group and all its topics, 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. >> >> >>> >> >> >> >>> >> -- >> >> >>> >> -- >> >> >>> >> 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 a topic >> >> >>> >> in >> >> >>> >> the >> >> >>> >> Google Groups "ODK Community" group. >> >> >>> >> To unsubscribe from this topic, visit >> >> >>> >> >> >> >>> >> >> >> >>> >> https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe. >> >> >>> >> To unsubscribe from this group and all its topics, 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. >> >> > >> >> > -- >> >> > -- >> >> > 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. >> >> >> >> -- >> >> -- >> >> 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 a topic in the >> >> Google Groups "ODK Community" group. >> >> To unsubscribe from this topic, visit >> >> https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe. >> >> To unsubscribe from this group and all its topics, send an email to >> >> opendatakit+unsubscribe@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. >> >> -- >> -- >> 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 a topic in the >> Google Groups "ODK Community" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> opendatakit+unsubscribe@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.
1 Like

Thanks Yaw.

It's make sense. I tried this technique at last but I didn't know about the
round function. Thanks for this info.

Regards, Naveen

ยทยทยท On Mon, Sep 7, 2015 at 8:44 PM, Yaw Anokwa wrote:

Naveen,

Names (what gets saved into the form) have to be unique, so I'd make
the names unique by adding a insignificant digits, then round the
total.

Attached is an example.

Yaw

On Wed, Sep 2, 2015 at 12:32 PM, Naveen Agarwal naveagar@gmail.com wrote:

Yes, that was working. But there is a problem as out of 6 multiple
answers,
4 having same score i.e. 2 so if someone choose option 1 or 2 and come
back
on the same question again after swipe then all four options
automatically
checked. How I can prevent this issue?

On Sep 2, 2015 9:47 PM, "Yaw Anokwa" yanokwa@nafundi.com wrote:

Naveen,

Does the example I showed you earlier do what you wanted? If is, use
that as a template.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Wed, Sep 2, 2015 at 12:10 PM, Naveen Agarwal naveagar@gmail.com wrote:

I am sorry, I think I was not enough clear. Actually whatever I choose
value
comes in C1 not in that which I am choosing.

Yaw, I would appreciate it you could run the excel to see actual
result.

Regards, Naveen
World Health Organization

On Sep 2, 2015 9:02 PM, "Yaw Anokwa" yanokwa@nafundi.com wrote:

Naveen,

The behavior you are seeing is normal. selected-at only selects from
the chosen answers. If you choose 3 items then only c1, c2, and c3
will be filled.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Wed, Sep 2, 2015 at 12:01 AM, Naveen Agarwal naveagar@gmail.com wrote:

I am trying with selected-at in XLSforms but not getting the exact
position.
I don't know where is I am wrong

Code is

select_multiple fam family Have any of your blood relatives ever
been

diagnosed with diabetes? (Check ALL that apply)

calculate c1 if(selected-at(${family},0),2,0)
calculate c2 if(selected-at(${family},1),2,0)
calculate c3 if(selected-at(${family},2),2,0)
calculate c4 if(selected-at(${family},3),2,0)
calculate c5 if(selected-at(${family},4),0,0)
calculate c6 if(selected-at(${family},5),0,0)
calculate fam_tot ${c1} + ${c2} + ${c3} + ${c4} + ${c5} + ${c6}

In any of above selection it takes c1 i.e. if I am selecting 5
option

then
also score is coming in c1 instead of c5

Excel is also attached.

On Monday, August 31, 2015 at 9:22:41 AM UTC+5:30, Naveen Agarwal wrote:

Thanks Swapnil for your response.

Yaw, you are always rocks.

Thanks a lot, it is same as required.

On Monday, August 31, 2015 at 1:29:54 AM UTC+5:30, Yaw Anokwa wrote:

Naveen,

Attached is an example.

Yaw

Need ODK services? http://nafundi.com provides form design,
server

setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 10:54 AM, Naveen Agarwal nave...@gmail.com wrote:

Thanks Yaw again for this.
Actually I am using XLSForms and not able to get the proper
result
as
may be
not using it properly.
Please help.

On Aug 30, 2015 8:01 PM, "Yaw Anokwa" yan...@nafundi.com wrote:

Oh, it's a select_multiple. Try using selected-at (see
https://opendatakit.org/help/form-design/binding/) to get the
values
at 1-6 and then add them up that way.

Yaw

Need ODK services? http://nafundi.com provides form design,
server
setup, professional support, and software development for ODK.

On Sun, Aug 30, 2015 at 9:20 AM, Naveen Agarwal nave...@gmail.com wrote:

Thanks Yaw.

I had seen it not able to use it as need to read each values
for
select
multiple.

On Aug 30, 2015 6:12 PM, "Yaw Anokwa" yan...@nafundi.com wrote:

Naveen,

See http://xlsform.org/#calculation

Yaw

Need ODK services? http://nafundi.com provides form
design,

server
setup, professional support, and software development for
ODK.

On Sun, Aug 30, 2015 at 6:55 AM, Naveen Agarwal nave...@gmail.com wrote:

Hi,

I am designing a questionnaire in which for every
question

there
are
some
marks. In this questionnaire, one question has multiple
options
and
user
can
select any number of options. On the basis of his/her
selection I
need
to
calculate the score e.g.

I had asked "Have any of your blood relatives ever been
diagnosed
with
diabetes? (Check ALL that apply)" and options are

  1. Mother (2 points)
  2. Father (2 points)
  3. Brothers/Sister (2 points)
  4. Children (2 points)
  5. Other (0 point)
  6. No/don't know (0 point)

Now suppose user chooses 2 options from above i.e. Mother
and
Children
then
his/her score should be 4.

How I can achieve it? I am using XLSForms.

Regards, Naveen
World Health Organization, India.

--

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 a
topic
in
the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit

https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.

To unsubscribe from this group and all its topics, 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.

--

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 a
topic

in
the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit

https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.

To unsubscribe from this group and all its topics, 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.

--

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.

--

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 a topic in
the

Google Groups "ODK Community" group.
To unsubscribe from this topic, visit

https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@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.

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/E78pnxjr4WE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Thanks and best regards,
Naveen Agarwal

Would you help me in this issue.
in this test excel sheet the calculation of the assets is as following:
tables = 2
chairs = 1
none = 0

How would the formula in the calculation be if I changed the tables calculation to be = 1, which means that there will be two assets with the same calculation.
Is there a different formula that i have to use instead of the one i already used in the test sheet.test (5).xls (42.5 KB)
The calculation i am seeking is that if the respondent chooses 'chairs' the calculation will be '1' and the same for the tables and if 'none' is chosen the calculation will be '0'test (5).xls (42.5 KB)

hello, what if its select_one and not multiple?