# Is it possible to have a customer add their own choices?

**URL:** <https://community.glideapps.com/t/is-it-possible-to-have-a-customer-add-their-own-choices/70238>\
**Category:** Ask for Help\
**Created:** [January 30, 2024, 8:52am UTC](https://community.glideapps.com/t/is-it-possible-to-have-a-customer-add-their-own-choices/70238 "2024-01-30T08:52:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattGlides](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@MattGlides](https://community.glideapps.com/u/MattGlides)\
**Post date:** [January 30, 2024, 8:52am UTC](https://community.glideapps.com/t/is-it-possible-to-have-a-customer-add-their-own-choices/70238/1 "2024-01-30T08:52:11Z")

</div>

Customers are currently in their own table and we have another options table where most of the choices drop down options are stored (eg. Petrol or Diesel), however it is okay if the solution doesn’t involve either/requires a new table.

The idea is that, on the Customers end, they click the choices drop down and can see different maintenance types e.g tyres and oil change. However we want to give them the ability to add their OWN maintenance type, and for it to remember that it belongs to that customer. Eg Customer A adds Car Wash, the next time they add a maintenance they’ll see three options: tyres; oil change and car wash while Customer B will still only see 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:** [January 30, 2024, 9:03am UTC](https://community.glideapps.com/t/is-it-possible-to-have-a-customer-add-their-own-choices/70238/2 "2024-01-30T09:03:15Z")

</div>

Never actually tried the following, but as I was reading your question the idea popped into my head:

- Store each customers list of choices as an array column in the Customers table, using a multi-files column
- Use a Helper Table to dynamically expand the array into a list for use in a choice component. This should be quite simple. You’d just need a query/relation in the Helper table to target the Customer table and filter by the signed in users CustomerID, use a Single Value to fetch the array of choices, then expand that using the RowIndex method.
- To add an option to the array, use a Make Array column that creates a new array from the current array, plus the item to be added, then a Set Column Values action to over write the array.
- And to remove an option, do the same thing except use a Remove Element column to create the new array.
- You might want to start with a default array of choices, which could be stored in the User Profile row, and use this if the Customer array is empty.

I think the above would work quite well…

---

<div class="post-metadata">

**Author:** ![MattGlides](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@MattGlides](https://community.glideapps.com/u/MattGlides)\
**Post date:** [January 30, 2024, 10:22am UTC](https://community.glideapps.com/t/is-it-possible-to-have-a-customer-add-their-own-choices/70238/3 "2024-01-30T10:22:16Z")

</div>

Sorry but what is the RowIndex method? Getting stuck at that part

---

<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:** [January 30, 2024, 10:31am UTC](https://community.glideapps.com/t/is-it-possible-to-have-a-customer-add-their-own-choices/70238/4 "2024-01-30T10:31:51Z")

</div>

The second use case described below:

> [@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…

For a small number of options, you could simply number the rows from 0 to N.  
Then use a Single Value column that targets the array of choices, and takes the RowIndex from Start.  
That should give you a list of choices, one per row.

---

<div class="post-metadata">

**Author:** ![MattGlides](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@MattGlides](https://community.glideapps.com/u/MattGlides)\
**Post date:** [January 30, 2024, 5:02pm UTC](https://community.glideapps.com/t/is-it-possible-to-have-a-customer-add-their-own-choices/70238/5 "2024-01-30T17:02:29Z")

</div>

I feel like my brain isn’t quite understanding this step, I did the below as per your video (added the extra rows myself)

 ![Screenshot 2024-01-30 185435](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/a/0a06e21f9191fbf4a899cea392319e3664d28b2a.png)

This is in my customers table:  
 ![Screenshot 2024-01-30 185622](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/e/9e08e19809a7dd1ed5e8873feb0501a9c1f4cc3a.png)

This is my query for loggedinuser plus single value of the multiplefiles column(tried the array column too just in case)  
 ![Screenshot 2024-01-30 185442](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/a/9a76da2841d053f670aef38720243318fce9e2f5.png)  
Now, uh, how do I get it to automatically add the correct number of rows with the choice in each row? Like I’m trying it this way:

 ![Screenshot 2024-01-30 185515](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/a/9aa73ef66d978e6d80093572db465573499a6cb7.png)  
But pretty sure thats wrong since its not adding new rows. Idk I feel confused with the use case I suppose

---

<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:** [January 30, 2024, 5:07pm UTC](https://community.glideapps.com/t/is-it-possible-to-have-a-customer-add-their-own-choices/70238/6 "2024-01-30T17:07:46Z")

</div>

You’re almost there, you’re just using the wrong column type at the final step.  
What you want is another single value that targets the previous single value, taking N from start where N is your row index. Make sure you target the column directly, and not via the table.

---

<div class="post-metadata">

**Author:** ![MattGlides](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@MattGlides](https://community.glideapps.com/u/MattGlides)\
**Post date:** [January 30, 2024, 5:24pm UTC](https://community.glideapps.com/t/is-it-possible-to-have-a-customer-add-their-own-choices/70238/7 "2024-01-30T17:24:37Z")

</div>

Ok so I have done this:

 ![Screenshot 2024-01-30 192201](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/9/e9175fb0e60dff477782074f2fe4f554f9041c4e.png)  
But it is only showing 2 rows, should it be adding a 3rd row automatically as theres 3 values or must I manually add more rows?  
 ![Screenshot 2024-01-30 192210](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/1/b1aaf563f659ebe84e8adfdd0bda8573c80aaa96.png)

---

<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:** [January 30, 2024, 5:25pm UTC](https://community.glideapps.com/t/is-it-possible-to-have-a-customer-add-their-own-choices/70238/8 "2024-01-30T17:25:18Z")

</div>

No, you need to add as many rows as you are likely to need.

---

<div class="post-metadata">

**Author:** ![MattGlides](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@MattGlides](https://community.glideapps.com/u/MattGlides)\
**Post date:** [January 30, 2024, 5:26pm UTC](https://community.glideapps.com/t/is-it-possible-to-have-a-customer-add-their-own-choices/70238/9 "2024-01-30T17:26:31Z")

</div>

Ok thank you

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [February 6, 2024, 5:27pm UTC](https://community.glideapps.com/t/is-it-possible-to-have-a-customer-add-their-own-choices/70238/10 "2024-02-06T17:27:12Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
