"Only when" condition in action


I put an “Only when” condition on my user log in action. The idea is to test if an user exists with the filled email address and test if the request’s result is > 1 .

But the request return 0 even if the user with the corresponding email address is within the data base.

Any idea ?

Thanks and regards.

Your only when is where the user count > 1. How could this ever be true?
But why do you need this>? The standard log in checks should suffice, no?

Yep exactly what I was going to say, greater than or equal to 1 is what you need, or IS 1

As the above posts say, if you’ve only got 1 user that matches a given email address (which presumably you have), then having a condition ‘only when user count’ is more than 1 will obviously fail, as you don’t have more than 1 user with that email address.

For it to work you’d need to use: >0 (more than 0), or ‘is’ 1.

Although, as mentioned above, I’m not sure what the point of that condition would be on a log in action, as you obviously can’t log a user in if they don’t have an account in the first place, so there’s really no need in using such a conditional there.

Thanks for your answers.

I went the shorter for writing this 1st message “Need of help” and did not gave the entire context on the use case.

I want to test if the field user-account-id is empty or not as a constraint of the user’s log in :
→ if yes : the user is not logged in and then an alert appears on the login form
→ if no : then the use is logged in.

Then I firstly tried to do that with the following Only When :

It did not work.

Then I just simply tested a count on the Users Search request’s which return 0 and then wrote the 1st message :slight_smile:

When I have a look on the debugger, it appears that the request does not return any user corresponding to the email address put in constraint even if the email address is within the DB.

Once logged in, I tested the following request count which again unexpectedly return me 0

When I tested the following, it returns me 1, as expected.

Is there any topic with request containing a constraint on the user’s email ?

Thanks and best regards.

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