# 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:** 1
**Showing post:** 2

<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.

---

_[View the full topic](https://community.glideapps.com/t/if-the-category-exists-it-is-not-added/38526)._
