The extraction displays either the name or the label

Bonjour

J’essaie L’extraction de données KoboToolbox via l’API V2 afin de les récupérer au format XLSX. Cependant, pour certains champs, les données extraites affichent soit le name du champ, soit le label du champ. Je voudrais pour toutes les extractions avoir le label du champ et non le name.

Comment faire cela pour les données déjà extraites et pour les extractions futures?

Bonjour Aristidey,

Je te conseille de consulter cet article pour créer des exports synchronisés tout en conservant les labels. Ils sont accessibles via l’API.

Bien à toi,

James

1 Like

Bonsoir James.

C’est la deuxième méthode (l’exportation synchrone) que j’ai utilisée pour avoir accès à mes données. Cependant dans une des colonnes des données exportées les informations s’affichent soit avec le name, soit avec le label (voir image ci-dessous

Je précise que le type de question est une question à choix unique. Les informations entourées en rouge sont les names et les autres sont les labels

@aristidey, do you recall of making any changes to the choices that are still in the xml value when downloading your data in XLS format?

Bonjour Kal_Lam, le champ en question (qui est une question à choix) concerne les noms des associations qui se créent au fur et à mesure. Donc chaque fois qu’un nouveau groupe se crée, je vais l’ajouter dans le XLS Form et je le charge à nouveau puis je le redéploie pour utilisation sur le terrain

for some fields, the extracted data displays either the field name or the field label. I would like to get the field label, not the name, for all extractions.

If you have the download setting Value and header format = ‘Labels’ then the export will endeavor to substitute the choice label associated with the choice name that is actually stored in the raw data, as obtained from the current form definition**.**

However, if you have been adding and removing choices across different deployed versions of your form, then it is possible perhaps that some earlier submissions - ie those from earlier form versions - the actual raw choice name value that was submitted back then doesn’t actually map to any of the choices in your latest version of the form anymore. In that case, Kobo cannot determine what label should now associated with the (raw) choice name value, so it can only substitute in the original raw value.

That is probably why you are seeing a mixture of both labels and raw name values - because the latest version of your form probably doesn’t cover all historical choice name values that might have been submitted in previous versions of your form.

If you see an raw names, eg “Succes_Nda_Nguessankro”, can you please check these are actually included in your latest form version’s choice list.