# Array values as a choice for user

**URL:** <https://community.glideapps.com/t/array-values-as-a-choice-for-user/77399>\
**Category:** Ask for Help\
**Created:** [October 28, 2024, 10:46am UTC](https://community.glideapps.com/t/array-values-as-a-choice-for-user/77399 "2024-10-28T10:46:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 28, 2024, 11:03am UTC](https://community.glideapps.com/t/array-values-as-a-choice-for-user/77399/2 "2024-10-28T11:03:20Z")

</div>

The source of a choice component must be a single column, with one option per row.  
To transform what you have there you can use a technique commonly referred to as the “Miracle Method”. Essentially:

- Create a Helper Table with enough rows in it to cover the maximum number of expected options in the array
- Index the rows, starting at zero
- Add your array to every row of the table (could be multiple ways to do this)
- Use a Single Value column to take N from start of the array, where N is the Row Index. This will give you one array element per row.
- Use a series of Query JSON or JavaScript columns to extract the data elements from the JSON string.
- Stitch them back together using a template.
- Use the template as the source of your Choice component.

> [@fishbaguette\_breadbasket Transpose Columns to an Inline List: The Miracle Method](https://community.glideapps.com/t/transpose-columns-to-an-inline-list-the-miracle-method/32766):
>
> I’m often asked how to take columns of data (say form responses) and display them in an inline list. Here’s one way to do it—the MIRACLE METHOD. [[Glide: Transpose Data Columns into an Inline List with the MIRACLE METHOD] ](https://www.youtube.com/watch?v=t-sh_Q3WbQc)

> [@How do I create an auto-incrementing row number with Glide Tables?](https://community.glideapps.com/t/how-do-i-create-an-auto-incrementing-row-number-with-glide-tables/39572):
>
> This is a question that comes up a lot, so creating this topic to use as a reference. Typically, there are two distinct use cases when it comes to auto-incrementing row numbers. Use Case 1: – We need to generate a Part Number, or an Order Number, or an Employee ID. Once the number is generated, it should never change, even if rows are deleted. – The general approach for this use case is to maintain a static counter, use it to craft a suitably formatted ID, and increment it by one every time…

---

_[View the full topic](https://community.glideapps.com/t/array-values-as-a-choice-for-user/77399)._
