# If the category exists it is not added

**URL:** https://community.glideapps.com/t/if-the-category-exists-it-is-not-added/38526
**Category:** Ask for Help
**Created:** [February 15, 2022, 6:00pm UTC](https://community.glideapps.com/t/if-the-category-exists-it-is-not-added/38526 "2022-02-15T18:00:28Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![scorpio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scorpio/32/38799_2.png) [@scorpio](https://community.glideapps.com/u/scorpio)
#### Post date: [February 15, 2022, 6:00pm UTC](https://community.glideapps.com/t/if-the-category-exists-it-is-not-added/38526/1 "2022-02-15T18:00:28Z")

</div>

hi  
Does anyone know how to make it so that if I add a new category and that category exists, a message appears that says the category already exists and does not repeat itself.

Thanks

---

<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 16, 2022, 12:34am UTC](https://community.glideapps.com/t/if-the-category-exists-it-is-not-added/38526/2 "2022-02-16T00:34:41Z")

</div>

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particula…

Firstly you should have a custom form, follow @Darren_Murphy 's instructions in that thread.

Assuming you store your category name in a “Category Input” variable:

- Create a relation from “Category Input” to the list of existing categories.
- Show an error message when relation is not empty (meaning that’s a duplicate).
- Only allow adding when “Category Input” is not empty and relation is empty.

---

<div class="post-metadata">

### Author: ![scorpio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scorpio/32/38799_2.png) [@scorpio](https://community.glideapps.com/u/scorpio)
#### Post date: [February 16, 2022, 12:06pm UTC](https://community.glideapps.com/t/if-the-category-exists-it-is-not-added/38526/3 "2022-02-16T12:06:48Z")

</div>

> [@ThinhDinh](#):
>
> Cree una relación desde “Entrada de categoría” hasta la lista de categorías existentes.

Thank you but I did not understand what you explained to me 🙄

---

<div class="post-metadata">

### Author: ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)
#### Post date: [February 16, 2022, 12:16pm UTC](https://community.glideapps.com/t/if-the-category-exists-it-is-not-added/38526/4 "2022-02-16T12:16:36Z")

</div>

If you want, I can help you live on a zoom meeting. 🙂

---

<div class="post-metadata">

### Author: ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)
#### Post date: [February 16, 2022, 12:17pm UTC](https://community.glideapps.com/t/if-the-category-exists-it-is-not-added/38526/5 "2022-02-16T12:17:56Z")

</div>

They will have to write the exact spelling of that category right? including the cases as well.  
For example, if the category is “Glide” and they write “glide”, the relation won’t be made.

---

<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 16, 2022, 12:26pm UTC](https://community.glideapps.com/t/if-the-category-exists-it-is-not-added/38526/6 "2022-02-16T12:26:25Z")

</div>

You can lowercase the input via a Glide plugin, and lowercase the whole existing list as well, then you make the relation through those lowercased text.

---

<div class="post-metadata">

### Author: ![scorpio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scorpio/32/38799_2.png) [@scorpio](https://community.glideapps.com/u/scorpio)
#### Post date: [February 16, 2022, 12:40pm UTC](https://community.glideapps.com/t/if-the-category-exists-it-is-not-added/38526/7 "2022-02-16T12:40:47Z")

</div>

is this app

> **[Project](https://curious-texture-5076.glideapp.io/)**

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [February 16, 2022, 12:58pm UTC](https://community.glideapps.com/t/if-the-category-exists-it-is-not-added/38526/8 "2022-02-16T12:58:33Z")

</div>

Is it like this?

> **[Category.mp4](https://drive.google.com/file/d/1xsg3B-ItLt0HURtNBuIlEQhbzW3nKdjI/view?usp=sharing)**
>
> Google Drive file.

> **[Project](https://adaptable-produce-6810.glideapp.io/)**

---

<div class="post-metadata">

### Author: ![scorpio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scorpio/32/38799_2.png) [@scorpio](https://community.glideapps.com/u/scorpio)
#### Post date: [February 16, 2022, 1:09pm UTC](https://community.glideapps.com/t/if-the-category-exists-it-is-not-added/38526/9 "2022-02-16T13:09:18Z")

</div>

Hi I’m going to see it and I’ll tell you.

Yes it was thank you very much…  
😍 😍 😍 😍 😍 😍 😍  
Thanks, teacher
