# Append a choice component list with a new value automatically after completing a form!

**URL:** <https://community.glideapps.com/t/append-a-choice-component-list-with-a-new-value-automatically-after-completing-a-form/21954>\
**Category:** Community Resources\
**Created:** [January 29, 2021, 6:30pm UTC](https://community.glideapps.com/t/append-a-choice-component-list-with-a-new-value-automatically-after-completing-a-form/21954 "2021-01-29T18:30:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [January 29, 2021, 6:30pm UTC](https://community.glideapps.com/t/append-a-choice-component-list-with-a-new-value-automatically-after-completing-a-form/21954/1 "2021-01-29T18:30:23Z")

</div>

## The scenario:

1. Assign a category to a task item using a choice component that’s pulling from a list of categories in a “Category sheet”
2. If the category doesn’t yet exist, create a new category AS YOU CREATE THE TASK and add it to the “Categories” sheet

## The solution:

1. Create a relation between the task category column and the list of categories in the “Categories” sheet
2. Create a multistep **On Submit Action** that checks if the relation `is empty/not empty` (category exists/doesn’t exist)

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/3/63f01207cb1e039648c302a7371a9fa18b262e47.jpeg "Glide: Append ANY CHOICE LIST after completing a form AUTOMATICALLY") ](https://www.youtube.com/watch?v=RyiOxzsN9N4)

---

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pratik_shah/32/12416_2.png) [@Pratik\_Shah](https://community.glideapps.com/u/Pratik_Shah)\
**Post date:** [January 29, 2021, 6:37pm UTC](https://community.glideapps.com/t/append-a-choice-component-list-with-a-new-value-automatically-after-completing-a-form/21954/2 "2021-01-29T18:37:12Z")

</div>

Great Video @Robert_Petitto Thank you for tutorial

---

<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 29, 2021, 7:05pm UTC](https://community.glideapps.com/t/append-a-choice-component-list-with-a-new-value-automatically-after-completing-a-form/21954/3 "2021-01-29T19:05:46Z")

</div>

I do something very similar to this in one of my apps.  
Except in my case, the text input component is initially hidden, and I provide an “Other” option in the choice component.  
If the user selects “Other”, then the text input component is revealed, and the user is prompted to describe the new choice item.  
And then this gets added as a new row to the choices column when they submit.

---

<div class="post-metadata">

**Author:** ![ehdubya](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ehdubya/32/24087_2.png) [@ehdubya](https://community.glideapps.com/u/ehdubya)\
**Post date:** [January 29, 2021, 7:08pm UTC](https://community.glideapps.com/t/append-a-choice-component-list-with-a-new-value-automatically-after-completing-a-form/21954/4 "2021-01-29T19:08:01Z")

</div>

Awesome! Anything that can be “dynamic” helps!

So, you could use a similar setup here to check to see if Usernames are available (if available, show text entry field) or unavailable (someone already chose that particular name; do NOT show text entry field), correct?

---

<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 29, 2021, 7:12pm UTC](https://community.glideapps.com/t/append-a-choice-component-list-with-a-new-value-automatically-after-completing-a-form/21954/5 "2021-01-29T19:12:46Z")

</div>

> [@ehdubya](#):
>
> So, you could use a similar setup here to check to see if Usernames are available (if available, show text entry field) or unavailable (someone already chose that particular name; do NOT show text entry field), correct?

For that use case, I’d use the same technique that Bob describes in his video. ie. whether or not a relation is empty.

For the case that I described, I’m just using a screen condition (if usc-choice equals Other)

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [January 29, 2021, 7:36pm UTC](https://community.glideapps.com/t/append-a-choice-component-list-with-a-new-value-automatically-after-completing-a-form/21954/6 "2021-01-29T19:36:00Z")

</div>

> [@ehdubya](#):
>
> So, you could use a similar setup here to check to see if Usernames are available (if available, show text entry field) or unavailable (someone already chose that particular name; do NOT show text entry field), correct?

You bet!

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [January 29, 2021, 10:23pm UTC](https://community.glideapps.com/t/append-a-choice-component-list-with-a-new-value-automatically-after-completing-a-form/21954/7 "2021-01-29T22:23:48Z")

</div>

## Slick!!!

PS: that little walk at the beginningwas great 🤣 like _“oh, there’s a cam here! Lemme show a new magic!”_

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [January 29, 2021, 10:35pm UTC](https://community.glideapps.com/t/append-a-choice-component-list-with-a-new-value-automatically-after-completing-a-form/21954/8 "2021-01-29T22:35:59Z")

</div>

Ha! Ya, it would have a much better effect if I had remembered to record in front of my Green screen 🤦‍♂️
