Data Export Tool Question

Hi All,

I am using the CommCare data export tool. Am I able to split multi-select
question into seperate columns for each choice?

Kind regards,

Hi Sam

The export tool doesn’t allow you to do that at present however I’ve added
it now so it will be available within the next few days (
https://github.com/dimagi/commcare-export/pull/46).

I will update this thread once the new version is available.

··· On 1 November 2016 at 12:53, Sam Phiri wrote:

Hi All,

I am using the CommCare data export tool. Am I able to split multi-select
question into seperate columns for each choice?

Kind regards,


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa

Thanks Simon.
Looking forward to that.

Kind regards,

··· On 2 November 2016 at 12:56, Simon Kelly wrote:

Hi Sam

The export tool doesn’t allow you to do that at present however I’ve added
it now so it will be available within the next few days (
https://github.com/dimagi/commcare-export/pull/46).

I will update this thread once the new version is available.

On 1 November 2016 at 12:53, Sam Phiri mitoworks21@gmail.com wrote:

Hi All,

I am using the CommCare data export tool. Am I able to split multi-select
question into seperate columns for each choice?

Kind regards,


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa


You received this message because you are subscribed to a topic in the
Google Groups “commcare-users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/commcare-users/Wwol-yyXD3s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Sam

The new version is released (version 0.12.4). There have been three new Map
Via
functions added:

  • selected: output True if multi-select value contains selected option
    otherwise False
    • e.g. selected(has_fever)
  • selected-at: output the Nth option from the multi-select value. N is
    zero-indexed i.e. first value is at “0”
    • e.g. If value is “red green blue”, selected-at(2) will output “blue”
  • count-selected: output the number of options in the multi-select
    value.
    • e.g. value = “a b c d”, Map Via = “count-selected”, output = “4”

Here’s an example of how you might use it in the Excel query file:

Field Source Field Map Via
First option muti_question1 selected-at(0)
Second option muti_question1 selected-at(1)
Num options muti_question1 count-selected
Has Fever muti_question1 selected(fever)

I’ve also updated the documentation
https://confluence.dimagi.com/display/commcarepublic/CommCare+Data+Export+Tool#CommCareDataExportTool-F.Functions
to
include this information.

Best regards
Simon

··· On 2 November 2016 at 16:05, Sam Phiri wrote:

Thanks Simon.
Looking forward to that.

Kind regards,

On 2 November 2016 at 12:56, Simon Kelly skelly@dimagi.com wrote:

Hi Sam

The export tool doesn’t allow you to do that at present however I’ve
added it now so it will be available within the next few days (
https://github.com/dimagi/commcare-export/pull/46).

I will update this thread once the new version is available.

On 1 November 2016 at 12:53, Sam Phiri mitoworks21@gmail.com wrote:

Hi All,

I am using the CommCare data export tool. Am I able to split
multi-select question into seperate columns for each choice?

Kind regards,


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa


You received this message because you are subscribed to a topic in the
Google Groups “commcare-users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/to
pic/commcare-users/Wwol-yyXD3s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa

Awesome!
Thank you Simon for the quick turn around on this. Will give test it out.

Kind regards,

··· On 3 November 2016 at 09:59, Simon Kelly wrote:

Hi Sam

The new version is released (version 0.12.4). There have been three new Map
Via
functions added:

  • selected: output True if multi-select value contains selected
    option otherwise False
    • e.g. selected(has_fever)
  • selected-at: output the Nth option from the multi-select value. N
    is zero-indexed i.e. first value is at “0”
    • e.g. If value is “red green blue”, selected-at(2) will output
      "blue"
  • count-selected: output the number of options in the multi-select
    value.
    • e.g. value = “a b c d”, Map Via = “count-selected”, output = “4”

Here’s an example of how you might use it in the Excel query file:

Field Source Field Map Via
First option muti_question1 selected-at(0)
Second option muti_question1 selected-at(1)
Num options muti_question1 count-selected
Has Fever muti_question1 selected(fever)

I’ve also updated the documentation
https://confluence.dimagi.com/display/commcarepublic/CommCare+Data+Export+Tool#CommCareDataExportTool-F.Functions to
include this information.

Best regards
Simon

On 2 November 2016 at 16:05, Sam Phiri mitoworks21@gmail.com wrote:

Thanks Simon.
Looking forward to that.

Kind regards,

On 2 November 2016 at 12:56, Simon Kelly skelly@dimagi.com wrote:

Hi Sam

The export tool doesn’t allow you to do that at present however I’ve
added it now so it will be available within the next few days (
https://github.com/dimagi/commcare-export/pull/46).

I will update this thread once the new version is available.

On 1 November 2016 at 12:53, Sam Phiri mitoworks21@gmail.com wrote:

Hi All,

I am using the CommCare data export tool. Am I able to split
multi-select question into seperate columns for each choice?

Kind regards,


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa


You received this message because you are subscribed to a topic in the
Google Groups “commcare-users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/to
pic/commcare-users/Wwol-yyXD3s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa


You received this message because you are subscribed to a topic in the
Google Groups “commcare-users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/commcare-users/Wwol-yyXD3s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.