Reuse yes_no options itemset in xml form definition

I have a lot of select_one with yes_no options.

I would like to define one yes_,no itemset and then reuse it in my forms.

I tried to create the following tags but it didn't work

yes 1 no 2

Thank you for your help

Hi @aowusuda and welcome to the ODK forum, we're glad you're here! Thank you for adding a profile picture as it helps build community. When you get a chance, please introduce yourself on this forum thread.
Are you writing your form directly in XML? I would highly recommend using XLSForm and authoring your form in a .xlsx file. Here is the documentation describing how to create a list of choices that you may reuse across questions: https://xlsform.org/en/#multiple-choice

For the record, not even the core team builds forms in XML. XLSForms is a lot easier to use and gives you the same power and flexibility as manually building forms with XML.

Thanks for your help @danbjoseph @yanokwa. I do prefer to write my forms in xml because I tink it's fun and pretty cool like magic how seemingly simple looking lines of code turn into xforms.

Although, when I am starting a new survey logic I am unfamiliar with, I start with excel form definitions or SurveyCTO online form designer or ODK Build.

1 Like