How to check if user entity matches with variable

Hi,


I am currently creating a process whereby the user enters his username and email and the submit button checks if the entered variables matches with the database but I am having some errors. How do I go about doing this?

Here is a screenshot of my process:

I use a If logic to check if the entered username matches with GetUsers.List.Current.User.Username and likewise with the email. The system will return error message each time.


Hi,

If you want to check if user exists with given username or email you make an aggregate and filter on these  two input values.

If the aggregate does not return empty the user does exist.

You should also include a filter on the users Is active property, to skip inactive user records.

Regards,

Daniel



Hamzah Syahid wrote:

Hi,


I am currently creating a process whereby the user enters his username and email and the submit button checks if the entered variables matches with the database but I am having some errors. How do I go about doing this?

Here is a screenshot of my process:

I use a If logic to check if the entered username matches with GetUsers.List.Current.User.Username and likewise with the email. The system will return error message each time.


Hello Hamzah Syahid,

At first you can check the fields data with the aggregate, by using for each and  if condition . I have attached screen action screenshot, and also the if condition used for the same:

Also the If condition used for the checking email and user name:

Regards, 

Tanvi H

Hamzah Syahid wrote:

Hi,


I am currently creating a process whereby the user enters his username and email and the submit button checks if the entered variables matches with the database but I am having some errors. How do I go about doing this?

Here is a screenshot of my process:

I use a If logic to check if the entered username matches with GetUsers.List.Current.User.Username and likewise with the email. The system will return error message each time.


Hi Hamzah Syahid,

If you are getting something wrong then apply the debug point and check the values which you are getting.

and as Daniel suggested you can also use filter property for to check weather user exist in table or not.


Hi Hamzah,


Daniël is correct. Using an aggregate and filtering on the username and email will work. Just to clarify for future reference, when you use GetUser.List.Current it will only return the current (aka first) entry in the Users DB and since you will most likely have more than one user in the DB you might not get the result you were expecting.

Regards

Stefan