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.
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.
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 :
Then I just simply tested a count on the Users Search request’s which return 0 and then wrote the 1st message
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.