# Great Combo between multi-select Choice component and Custom ai component

**URL:** https://community.glideapps.com/t/great-combo-between-multi-select-choice-component-and-custom-ai-component/80330
**Category:** Project Showcase
**Tags:** choice, custom-code
**Created:** [February 25, 2025, 3:59pm UTC](https://community.glideapps.com/t/great-combo-between-multi-select-choice-component-and-custom-ai-component/80330 "2025-02-25T15:59:17Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Marc-Olivier](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@Marc-Olivier](https://community.glideapps.com/u/Marc-Olivier)
#### Post date: [February 25, 2025, 3:59pm UTC](https://community.glideapps.com/t/great-combo-between-multi-select-choice-component-and-custom-ai-component/80330/1 "2025-02-25T15:59:17Z")

</div>

**Hey Glide Community! 👋**

Discover a powerful and simple combination of the classic multi-select Choice component and the Custom AI component.

 ![screenK 2025-02-25 à 16.58.00 (1)](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/f/3f693b674f7442309dbb499383e7606cfdce071f.jpeg)

**How It Works:**

1. **Choice Component:**

- **Data Fields:**
  - The Choice component displays all options from the options table.
  - It saves the selected option IDs as a comma-separated string in the `choiceValues` column.
  - **Choice Component Data fields:**  
 ![screenK 2025-02-25 à 16.29.55](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/c/dc99fa20980727a058431e2e46d20efb2f4afee3.jpeg)

1. **Custom AI Component:**

- **Custom AI Component Data fields:**  

- **Functionality:**

```auto
[
  {"id":"0hMpgsHIRyu.zstJUSq.wQ","name":"Okra","genus":"Abelmoschus","species":"esculentus"},
  {"id":"KxlHv3oZSnGYvISfSuNREg","name":"Chenille Copperleaf","genus":"Acalypha","species":"hispida"},
  ...
]

```

- It shows tags for options whose IDs are included in `choiceValues`.
- Each tag includes a cross button to remove the corresponding ID from `choiceValues`.

**Custom AI Prompt:**

```auto
optionsArray is a string array structured like this:
[
  {"id":"0hMpgsHIRyu.zstJUSq.wQ","name":"Okra","genus":"Abelmoschus","species":"esculentus"},
  {"id":"KxlHv3oZSnGYvISfSuNREg","name":"Chenille Copperleaf","genus":"Acalypha","species":"hispida"},
  ...
]
choiceValues is a comma-separated string of IDs. Show in a tag, with a cross button, the label for which the ID is included in choiceValues. When the user clicks on the button, remove the ID from choiceValues.

```

* * *

Try it out: [https://choice-customcomponent.glide.page/](https://choice-customcomponent.glide.page/)

---

<div class="post-metadata">

### Author: ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)
#### Post date: [February 25, 2025, 5:37pm UTC](https://community.glideapps.com/t/great-combo-between-multi-select-choice-component-and-custom-ai-component/80330/2 "2025-02-25T17:37:55Z")

</div>

I like it! Good job!

I created a similar version that focuses solely on the AI component and uses JSON. I like yours because it allows the use of native columns.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/3/130cc7039a9e92fecfbf811558b163e9ffedc63f.png)  
Take a look:

> **[Glide Ai Component Library](https://aicomponents.glide.page/dl/a400f7/s/9671c3/r/XB1-IqeaQPOJUtS0.2XpKg)**
>
> Ai Components

---

<div class="post-metadata">

### Author: ![Marc-Olivier](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@Marc-Olivier](https://community.glideapps.com/u/Marc-Olivier)
#### Post date: [February 25, 2025, 5:58pm UTC](https://community.glideapps.com/t/great-combo-between-multi-select-choice-component-and-custom-ai-component/80330/3 "2025-02-25T17:58:25Z")

</div>

Yes that’s great if you don’t want to use the choice component.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [February 26, 2025, 12:34am UTC](https://community.glideapps.com/t/great-combo-between-multi-select-choice-component-and-custom-ai-component/80330/4 "2025-02-26T00:34:17Z")

</div>

Sweet! Thanks for sharing.

---

<div class="post-metadata">

### Author: ![Marc-Olivier](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@Marc-Olivier](https://community.glideapps.com/u/Marc-Olivier)
#### Post date: [February 26, 2025, 9:45am UTC](https://community.glideapps.com/t/great-combo-between-multi-select-choice-component-and-custom-ai-component/80330/5 "2025-02-26T09:45:55Z")

</div>

Thanks, since the custom component problem, I was thinking that combining both glide and custom component could be a solution.

---

<div class="post-metadata">

### Author: ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)
#### Post date: [March 7, 2025, 12:55pm UTC](https://community.glideapps.com/t/great-combo-between-multi-select-choice-component-and-custom-ai-component/80330/6 "2025-03-07T12:55:34Z")

</div>

Nice job and solution and thanks for instructions 💪

---

<div class="post-metadata">

### Author: ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)
#### Post date: [March 7, 2025, 12:58pm UTC](https://community.glideapps.com/t/great-combo-between-multi-select-choice-component-and-custom-ai-component/80330/7 "2025-03-07T12:58:08Z")

</div>

Thank you so much for your comments!
