# Search for existing user not working

**URL:** <https://forum.bubble.io/t/search-for-existing-user-not-working/247412>\
**Category:** Need help\
**Created:** [February 17, 2023, 4:55am UTC](https://forum.bubble.io/t/search-for-existing-user-not-working/247412 "2023-02-17T04:55:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![cinji18](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@cinji18](https://forum.bubble.io/u/cinji18)\
**Post date:** [February 17, 2023, 4:55am UTC](https://forum.bubble.io/t/search-for-existing-user-not-working/247412/1 "2023-02-17T04:55:52Z")

</div>

Hi, everyone:

In my User list, I already have a user named _Inspector Gadget_:

 ![Screenshot_20230216_084651](https://us1.discourse-cdn.com/bubble/original/3X/0/1/01993f82f202ebd350947eb7d6689a405662a82a.png)

When it is a new user, a payment workflow is supposed to run:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/3/2/32dd8ae6276baffbd4101888fd3a0b1c5de202f5.png)

However, when I preview this workflow and I input _Inspector Gadget_ (which is already in the database), the workflow still runs. While debugging, I found this:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/f/9/f92c5267edcf03240fbdf7617d713556e43aa916.png)

I do not understand why the count is 0. Isn’t the count supposed to be 1 since it is found in the database? What am I missing or doing wrong?

Thank you.

---

<div class="post-metadata">

**Author:** ![kazimdgoni](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kazimdgoni/32/148445_2.png) [@kazimdgoni](https://forum.bubble.io/u/kazimdgoni)\
**Post date:** [February 17, 2023, 5:06am UTC](https://forum.bubble.io/t/search-for-existing-user-not-working/247412/2 "2023-02-17T05:06:21Z")

</div>

I think problem lies in the only when condition. What does it mean by :count is 0? What debugger says if you click on :count is 0. It will show false. Because there is a user.

---

<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:** [February 17, 2023, 5:15am UTC](https://forum.bubble.io/t/search-for-existing-user-not-working/247412/3 "2023-02-17T05:15:44Z")

</div>

Hi there, @cinji18… do you have any privacy rules in place on the `User` data type that might be getting in the way of the search?

Best…  
Mike

---

<div class="post-metadata">

**Author:** ![cinji18](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@cinji18](https://forum.bubble.io/u/cinji18)\
**Post date:** [February 17, 2023, 5:16am UTC](https://forum.bubble.io/t/search-for-existing-user-not-working/247412/4 "2023-02-17T05:16:35Z")

</div>

I didn’t change anything in the privacy rules for User, so it should be the default.

---

<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:** [February 17, 2023, 5:18am UTC](https://forum.bubble.io/t/search-for-existing-user-not-working/247412/5 "2023-02-17T05:18:13Z")

</div>

Yes, that’s my point. If the default rule is in place on the `User` data type, the search won’t work.

---

<div class="post-metadata">

**Author:** ![cinji18](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@cinji18](https://forum.bubble.io/u/cinji18)\
**Post date:** [February 17, 2023, 5:19am UTC](https://forum.bubble.io/t/search-for-existing-user-not-working/247412/6 "2023-02-17T05:19:00Z")

</div>

Here’s what the debugger shows in sequence:  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/3/4/347dad9cbf98f0823141781315d5391b2b756d43.png)

![image](https://us1.discourse-cdn.com/bubble/original/3X/6/d/6d94e01c67524dbf11fed676b2010c74db1748d7.png)

![image](https://us1.discourse-cdn.com/bubble/original/3X/d/d/dd8e1522054b6f2d0a0eef4cb9ced9e13c34e34b.png)

---

<div class="post-metadata">

**Author:** ![cinji18](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@cinji18](https://forum.bubble.io/u/cinji18)\
**Post date:** [February 17, 2023, 5:20am UTC](https://forum.bubble.io/t/search-for-existing-user-not-working/247412/7 "2023-02-17T05:20:24Z")

</div>

Oh, so how do I change it so that it only runs when the User does not already exist?

---

<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:** [February 17, 2023, 5:22am UTC](https://forum.bubble.io/t/search-for-existing-user-not-working/247412/8 "2023-02-17T05:22:16Z")

</div>

Well, just to see if that is the issue, remove the default rule and see if it works. If it does, you know that rule was getting in the way. Then, add the appropriate privacy rules (across all of your data types) that make sense for your app, and only you can know what those rules are.

---

<div class="post-metadata">

**Author:** ![cinji18](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@cinji18](https://forum.bubble.io/u/cinji18)\
**Post date:** [February 17, 2023, 5:29am UTC](https://forum.bubble.io/t/search-for-existing-user-not-working/247412/9 "2023-02-17T05:29:43Z")

</div>

Ok. I’ll give that a shot. Thanks.

---

<div class="post-metadata">

**Author:** ![cinji18](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@cinji18](https://forum.bubble.io/u/cinji18)\
**Post date:** [February 17, 2023, 11:01pm UTC](https://forum.bubble.io/t/search-for-existing-user-not-working/247412/10 "2023-02-17T23:01:41Z")

</div>

After watching a couple of videos on privacy rules, I was able to get it working. Thank you.

Now I find out it’s case sensitive, so I looking to see how to turn that off.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [April 28, 2023, 4:56am UTC](https://forum.bubble.io/t/search-for-existing-user-not-working/247412/11 "2023-04-28T04:56:42Z")

</div>

This topic was automatically closed after 70 days. New replies are no longer allowed.
