# Why/how are these two logic configs different?

**URL:** <https://forum.bubble.io/t/why-how-are-these-two-logic-configs-different/274001>\
**Category:** Questions\
**Created:** [July 24, 2023, 1:22pm UTC](https://forum.bubble.io/t/why-how-are-these-two-logic-configs-different/274001 "2023-07-24T13:22:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin.hunt](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@kevin.hunt](https://forum.bubble.io/u/kevin.hunt)\
**Post date:** [July 24, 2023, 1:22pm UTC](https://forum.bubble.io/t/why-how-are-these-two-logic-configs-different/274001/1 "2023-07-24T13:22:20Z")

</div>

Hi,

I am hoping that someone can explain what the difference between two logic statements I have tried to use.

I am configuring a page redirect to send all but one user type to the home page on page load and have had to change the logic in the Only When window in order to make it work.

I originally put the following condition  
Only When – Current User’s User Type \<\> User\_Type\_A

As this did not work, I put  
Only When – Search for User (where User email = current Users email AND User\_Type \<\> User\_Type\_A)count\>0

This second condition works but I can’t see why the first one does not.  
And what would the outcome of this second condition be if the User Type was not defined (ie. had a Null value). That is not possible in this case but I would like to understand for future reference.

Can anyone help me out here?

Thanks,

KH

---

<div class="post-metadata">

**Author:** ![georgecollier](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/georgecollier/32/182327_2.png) [@georgecollier](https://forum.bubble.io/u/georgecollier)\
**Post date:** [July 24, 2023, 2:52pm UTC](https://forum.bubble.io/t/why-how-are-these-two-logic-configs-different/274001/2 "2023-07-24T14:52:15Z")

</div>

What do you mean by it didn’t work? What was the expected behaviour and what happened when you tested with various users (logged out, logged in with valid type, logged in with invalid type)

---

<div class="post-metadata">

**Author:** ![kevin.hunt](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@kevin.hunt](https://forum.bubble.io/u/kevin.hunt)\
**Post date:** [July 24, 2023, 7:11pm UTC](https://forum.bubble.io/t/why-how-are-these-two-logic-configs-different/274001/3 "2023-07-24T19:11:58Z")

</div>

Thanks for your help!!

When I used Current User’s User Type \<\> User Type A, it redirects all users to the Index including User Type A. Basically it redirected all users to the index page. I logged in with various different user accounts so it was not an issue with just one account. The User Type is an option set so it is not a misspelling.

Using do a search for user with the same email as current user and User Type \<\> Type A with a count greater than zero, using the same conditions, redirects all users that are not Type A and does not redirect Type A users.

I originally had a condition that all users that were not logged in got redirected but took it out in the debugging phase. I have been testing with just users logged in and have confirmed that they are logged in by putting a text field on the page to show their log in email.

I would have thought that the first approach is legit and more efficient. What am I missing here? 🙁

---

<div class="post-metadata">

**Author:** ![georgecollier](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/georgecollier/32/182327_2.png) [@georgecollier](https://forum.bubble.io/u/georgecollier)\
**Post date:** [July 24, 2023, 9:44pm UTC](https://forum.bubble.io/t/why-how-are-these-two-logic-configs-different/274001/4 "2023-07-24T21:44:14Z")

</div>

> [@kevin.hunt](#):
>
> Current User’s User Type \<\> User Type A, it redirects all users to the Index including User Type A

Place a text on one of your pages (disable the redirect workflow) that is Current user’s User Type’s Display.

Then, inspect it in debug mode (?debug\_mode=true at the end of your URL). Does it display correctly? If not, what happens if you click on the expression? My guess is you have privacy rules hiding the User Type from the current user or something (because if the user can’t see User Type then User Type always \<\> User Type A as it’s always empty)

---

<div class="post-metadata">

**Author:** ![kevin.hunt](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@kevin.hunt](https://forum.bubble.io/u/kevin.hunt)\
**Post date:** [July 26, 2023, 8:58pm UTC](https://forum.bubble.io/t/why-how-are-these-two-logic-configs-different/274001/5 "2023-07-26T20:58:39Z")

</div>

@georgecollier You were right on the money!!! I don’t know exactly what I did but I suspect that when I updated the User\_Type Option set, it broke the existing privacy rule. It said that something had been deleted. Fixed that and it now works as it did before (ie. perfectly). Thanks!!
