Show labels for choices when data is pulled

Hello family!
I hope you are all doing well?
I would like to know if there is any update on how to pull data Kobo to power bi showing the labels instead of the xml values using the API version 2

1 Like

Welcome to the community, @Alex_ousman! We will let you know when we resolve this issue.

Okay thanks and hope there is any workaround
If any please help

A workaround is well illustrated here: Show 'Labels' instead of XML Values in KoBoToolbox using jr:choice-name! - YouTube
Essentially runs a jr calc to record the label making it available as a field to share/pull.

Except, I spoke too soon. This is not an advised route, there seem to be all sorts of glitches when using jr:choice-name. Mine current is that I cannot then share that field dynamically…

@Kal_Lam Is there any update on whether this is possible?

Can you be more specific about what the issue(s) are that you are seeing using jr:choice-name for this?

It is a bit tricky to get right, I admit, but you should be able to use a calculation with jr:choice-name() to get the label for a select_one, and this calculated field should be shareable ‘dynamically’, just like any other submission field [Note, this calculated field with the select option label could also be pulled down into, say, PowerBI and used instead of the original selected option value].

Or, if you have the same choice list in both your child form and parent form, the child form can also lookup the label corresponding to a dynamically shared value. So there are a few possible options here - if you can be more specific about what you are trying to do I might be able to offer some suggestions.

@Xiphware I’m trying to get the same end result as Chris but without having to create a calculation field for every select_one or select_multiple question. This would increase the speed and cost of processing the data.

I saw it possible in the v1 API which is being phased out:
https://support.kobotoolbox.org/migrating_api.html

Is there a way to pull the question labels and choices labels using an API?