# Searching database a conditional factor

**URL:** <https://forum.bubble.io/t/searching-database-a-conditional-factor/201332>\
**Category:** Database\
**Created:** [April 9, 2022, 11:25am UTC](https://forum.bubble.io/t/searching-database-a-conditional-factor/201332 "2022-04-09T11:25:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon69612178](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@anon69612178](https://forum.bubble.io/u/anon69612178)\
**Post date:** [April 9, 2022, 11:25am UTC](https://forum.bubble.io/t/searching-database-a-conditional-factor/201332/1 "2022-04-09T11:25:21Z")

</div>

Hi can someone please help me with this question.

I am creating a party RSVP page. I want to create a condition that prevents users from being able to RSVP (with the RSVP button) if they have already done so before (if their email already exists in the database)

 ![Screenshot 2022-04-09 at 12.14.46](https://us1.discourse-cdn.com/bubble/original/3X/6/2/62cf106872d69ccfea3a0726af371d111b054fb9.png)  
I currently have a list of actions to create a new guest that are triggered in the workflow section when that RSVP button is clicked.  
 ![Screenshot 2022-04-09 at 12.20.22](https://us1.discourse-cdn.com/bubble/original/3X/3/4/34de342fce1f4730f40fa869af267a019c6c2841.png)  
I am trying to create any “only when” condition that creates a new guest (when someone RSVPs) only when their email doesnt exist in the “created by” (users email list) column of the database

Can someone please help me with this?

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [April 9, 2022, 11:42am UTC](https://forum.bubble.io/t/searching-database-a-conditional-factor/201332/2 "2022-04-09T11:42:40Z")

</div>

Hi there, @anon69612178… if I understand your post correctly, your only when condition should be a `Search for Guests:count > 0` with a constraint on the search of `Created by = Current User`.

Hope this helps.

Best…  
Mike

---

<div class="post-metadata">

**Author:** ![anon69612178](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@anon69612178](https://forum.bubble.io/u/anon69612178)\
**Post date:** [April 9, 2022, 11:50am UTC](https://forum.bubble.io/t/searching-database-a-conditional-factor/201332/3 "2022-04-09T11:50:31Z")

</div>

great thanks @mikeloc I think its working! 😃
