Referencing a select_* variable gives the values and not the labels. You would have to use jr:choice-name(${variable}, 'value') for each of the values you’d want to retrieve the correct choice label.
E.g
if(selected(${delivery_complications}, 'xyz'), jr:choice-name(${delivery_complications}, 'xyz') would give the choice label associated with value ‘xyz’.
EDIT: this approach was initially tested with the Kobo form builder. Unfortunately no current cht-core release supports this pattern. This would however be supported when https://github.com/medic/cht-core/tree/6345-enketo-uplift merges.
The above pattern will not work with multiple selects.
The recommended approach would be slightly longer than what you would use with single selects.
For this multi selects, we would need to calculate each label separately using a combination of select-at and jr:choice-name and then concatenate them using join.
Let’s say we have the following under the choices sheet
list_name name label::en
gender male Male
gender female Female
turns out, i believe, we were looking at the wrong problem - apologies for missing that detail.
the solutions above work for their specific usecases, but they all apply to forms. they render the label of the choice - on the form - which i believe is the default from what i’ve learned.