Community Health Toolkit

Can we show Label instead of name from choices in reports

At present we are showing up the selected choice name instead of label in reports. Can we display choices Label in the place of choice name in reports?

Choices Sheet:
List_name: reasons
name: childhood_illness
Label: Childhood Illness

choices name

A common way to do that is with the jr:choice-name() function. You can see more info about that in this response.

Hope that helps! Let us know if you encounter any issues using it.

1 Like

Hi @marc . Thank you for your quick reply.

`jr:choice-name()’ is working only for select_one .If its select multiple the selected options is not showing up in reports .Only the path is showing up .

I am trying to display the selected options with β€˜,’ separate and the below calculation is working if i have to show the multiple selected options on from .In reports only the Path is showing up.
concat(jr:choice-name(selected-at(${health_problems}, 0), β€˜${health_problems}’), β€˜,’,
jr:choice-name(selected-at(${health_problems}, 1), β€˜${health_problems}’), β€˜,’,
jr:choice-name(selected-at(${health_problems}, 2), β€˜${health_problems}’), β€˜,’,
jr:choice-name(selected-at(${health_problems}, 3), β€˜${health_problems}’), β€˜,’,
jr:choice-name(selected-at(${health_problems}, 4), β€˜${health_problems}’), β€˜,’,
jr:choice-name(selected-at(${health_problems}, 5), β€˜${health_problems}’), β€˜,’,
jr:choice-name(selected-at(${health_problems}, 6), β€˜${health_problems}’), β€˜,’,
jr:choice-name(selected-at(${health_problems}, 7), β€˜${health_problems}’), β€˜,’,
jr:choice-name(selected-at(${health_problems}, 8), β€˜${health_problems}’), β€˜,’,
jr:choice-name(selected-at(${health_problems}, 9), β€˜${health_problems}’), β€˜,’,
jr:choice-name(selected-at(${health_problems}, 10), β€˜${health_problems}’), β€˜,’)

Can you help me if there is any other solution to show multiple selected choice with label on reports.

Just to make sure I understand, could you sketch or mock up what you hope the report to look like? With that we could discuss it further to figure out the best approach.

Hi @marc


In the above image we are showing up choice name of the multiple selected options .I want to show the choice label with β€˜,’ separated. I tried to concat the choice names but Nothing is showing up on reports(Its working fine in form).


As the above solution is not working for select_multiple for now I am using β€˜contains’ and showing up the selected options as below.

It is very helpful to see what you are trying to achieve there! Displaying the info on the reports tab is indeed different than showing it in the form. I’ll explore a bit to see what’s going on.

Are you able to share your form for testing? I want to reproduce the behaviour that you are seeing with the jr:choice-name for a multiple select, especially since you have it working in the form but not the report view.