# Condition "code entered is in list"

**URL:** <https://community.glideapps.com/t/condition-code-entered-is-in-list/45538>\
**Category:** Ask for Help\
**Created:** [July 29, 2022, 2:47pm UTC](https://community.glideapps.com/t/condition-code-entered-is-in-list/45538 "2022-07-29T14:47:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pierre\_Peckel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pierre_peckel/32/36278_2.png) [@Pierre\_Peckel](https://community.glideapps.com/u/Pierre_Peckel)\
**Post date:** [July 29, 2022, 2:47pm UTC](https://community.glideapps.com/t/condition-code-entered-is-in-list/45538/1 "2022-07-29T14:47:47Z")

</div>

Hello there !

Is it possible to create a condition for an action button where the text entered in a field must be part of a list.

The goal would be to send a unique code to each user and they will need to insert in a field it to be able to order something. In case the code is not part of the list of code, then they can’t go to the next step.

Thank you for the help !

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [July 29, 2022, 2:52pm UTC](https://community.glideapps.com/t/condition-code-entered-is-in-list/45538/2 "2022-07-29T14:52:59Z")

</div>

You would need a relation to link that code to the table that contains all valid codes. Then create a new custom action. In that custom action you can have an IF condition that can check in the relation is empty. If it’s empty, then you can have actions that will run when the code is not valid. If the relation is not empty, then it’s a valid code and you can do a different set of actions.

---

<div class="post-metadata">

**Author:** ![Pierre\_Peckel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pierre_peckel/32/36278_2.png) [@Pierre\_Peckel](https://community.glideapps.com/u/Pierre_Peckel)\
**Post date:** [July 29, 2022, 3:03pm UTC](https://community.glideapps.com/t/condition-code-entered-is-in-list/45538/3 "2022-07-29T15:03:16Z")

</div>

Thank you very much !

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [July 30, 2022, 3:03pm UTC](https://community.glideapps.com/t/condition-code-entered-is-in-list/45538/4 "2022-07-30T15:03:40Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
