# Generate multiple choice alternatives, based on the answers in a repeat

**URL:** <https://forum.getodk.org/t/generate-multiple-choice-alternatives-based-on-the-answers-in-a-repeat/10269>\
**Category:** Support\
**Tags:** form-design, odk-xforms, odk-xlsform\
**Created:** [October 18, 2017, 2:54pm UTC](https://forum.getodk.org/t/generate-multiple-choice-alternatives-based-on-the-answers-in-a-repeat/10269 "2017-10-18T14:54:17Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![LN](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ln/32/1605_2.png) [@LN](https://forum.getodk.org/u/LN)\
**Post date:** [December 9, 2020, 6:45pm UTC](https://forum.getodk.org/t/generate-multiple-choice-alternatives-based-on-the-answers-in-a-repeat/10269/16 "2020-12-09T18:45:58Z")

</div>

As of `pyxform` v1.3.1 and [XLSForm Online v1.3.1](https://getodk.org/xlsform/), it is now possible to create a select from a repeat. The documentation is available [here](https://docs.getodk.org/form-logic/#generating-select-ones-from-repeats). We expect this will be released in [Central](https://docs.getodk.org/central-intro/) within the next 2 weeks. This new feature produces exactly the same result as the example [XForms modification I shared](https://forum.getodk.org/t/generate-multiple-choice-alternatives-based-on-the-answers-in-a-repeat/10269/4).

Use it with question `type` `select_one ${field_in_repeat}` where `${field_in_repeat}` is the field you want to use for your select options. Note that the same text used to display each choice will also be used as the value that you will see in the data used for analysis and that it may contain spaces. This functionality is currently only supported for `select_one` (not `select_multiple`).

Other select features such as `choice_filter` are supported. [select-one-from-repeats](https://docs.google.com/spreadsheets/d/1jHLccGYNdbS-ScnfyFSdNmlnRBhtgsUc-qzjEXK8Ids/edit#gid=0) is a working example.

---

_[View the full topic](https://forum.getodk.org/t/generate-multiple-choice-alternatives-based-on-the-answers-in-a-repeat/10269)._
