# AI Component to Clear All / Select All in Checklist collection

**URL:** <https://community.glideapps.com/t/ai-component-to-clear-all-select-all-in-checklist-collection/77013>\
**Category:** Project Showcase\
**Tags:** ai, custom-code, collections\
**Created:** [October 12, 2024, 12:36pm UTC](https://community.glideapps.com/t/ai-component-to-clear-all-select-all-in-checklist-collection/77013 "2024-10-12T12:36:59Z")\
**Posts on this page:** 9\
**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:** [October 12, 2024, 12:37pm UTC](https://community.glideapps.com/t/ai-component-to-clear-all-select-all-in-checklist-collection/77013/1 "2024-10-12T12:37:00Z")

</div>

There have been several requests for people to find a way to clear a value in multiple rows and several solutions proposed:

#### Sept 2020 | @Robert_Petitto | The timestamp method with Flashcards [✅ Flashcard: Create and Study Custom Flashcards](https://community.glideapps.com/t/flashcard-create-and-study-custom-flashcards/16531)

#### Feb 2021 | @Jeff_Hager | The matching values method [Reset Multiple Rows At Once](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211)

Here is a new method using the AI component in a checklist component collection.

On the left the Glide component and on the right the AI component, both in collections  
 ![Ai](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/7/a70d9511da381f65f054aa1cc422a5db7d11cc73.gif)

In this method, each AI component in the collection listens to a computed single value column for a matching word. If the word is reset then each AI component are asked to set the check to false and if the word is all to true.

The AI component is connected to 5 Columns:

- Name
- Price
- Photo
- Selected (User specific)
- Status (the single value column)

Here is the prompt for the AI component:

1. Create a checkbox component no label binded to **Selected** with **Name** , **Price** and **Photo** next to the checkbox. Set the component background color opacity to 0 and add a thick border with accent color to the **Photo** when Selected is true. Photo should always be visible.

2. When the value of **Status** changes and is equal to reset, the component should automatically respond to this change and update itself to set **Selected** value to false.

3. When the value of **Status** changes and is equal to all, the component should automatically respond to this change and update itself to set **Selected** value to true.

#### Here is the App [https://ai-delete-select-all.glide.page](https://ai-delete-select-all.glide.page/) (Download Template on the app)

---

<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:** [October 13, 2024, 12:00am UTC](https://community.glideapps.com/t/ai-component-to-clear-all-select-all-in-checklist-collection/77013/2 "2024-10-13T00:00:50Z")

</div>

Thanks for sharing! Is the only problem here scaling? I think you have to add a component for each row?

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [October 13, 2024, 9:12am UTC](https://community.glideapps.com/t/ai-component-to-clear-all-select-all-in-checklist-collection/77013/3 "2024-10-13T09:12:56Z")

</div>

Not sure but I’m guessing the AI component is inside a custom collection configured to full width rather than card.

---

<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:** [October 13, 2024, 9:27am UTC](https://community.glideapps.com/t/ai-component-to-clear-all-select-all-in-checklist-collection/77013/4 "2024-10-13T09:27:42Z")

</div>

Yes Nathanael is right, it’s a single ai component used in a custom collection. The only problem I see in scaling is the time needed to reset all rows. If you download the template, you can see that in the reset action I have put a very small wait timer 0.5. This timer should be bigger with the number of rows OR you could just find a condition like a roll up to replace wait action by wait with condition action

---

<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:** [October 13, 2024, 9:30am UTC](https://community.glideapps.com/t/ai-component-to-clear-all-select-all-in-checklist-collection/77013/5 "2024-10-13T09:30:53Z")

</div>

Excellent, thanks for the clarification.

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [October 13, 2024, 9:31am UTC](https://community.glideapps.com/t/ai-component-to-clear-all-select-all-in-checklist-collection/77013/6 "2024-10-13T09:31:54Z")

</div>

I have to start using the custom collection and AI component. I basically never use those, but it seems the combo is very powerful.

---

<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:** [October 13, 2024, 11:35am UTC](https://community.glideapps.com/t/ai-component-to-clear-all-select-all-in-checklist-collection/77013/7 "2024-10-13T11:35:50Z")

</div>

Be careful about using them in production though, make sure you always test tied actions in production.

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [October 13, 2024, 11:54pm UTC](https://community.glideapps.com/t/ai-component-to-clear-all-select-all-in-checklist-collection/77013/8 "2024-10-13T23:54:42Z")

</div>

> [@ThinhDinh](#):
>
> tied actions

What are tied actions?

---

<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:** [October 13, 2024, 11:56pm UTC](https://community.glideapps.com/t/ai-component-to-clear-all-select-all-in-checklist-collection/77013/9 "2024-10-13T23:56:51Z")

</div>

You can add actions to those components and write a prompt on when you want those actions to be triggered.

They have been working much more reliably recently, but make sure you always test those actions in production.
