Search for existing user not working

Hi, everyone:

In my User list, I already have a user named Inspector Gadget:

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

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:

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.

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.

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

1 Like

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

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

Here’s what the debugger shows in sequence:
image

image

image

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

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.

2 Likes

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

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.

1 Like

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