Compare the email field with the user.email field in the database
Hi guys, I'm new to outsystems and right now I'm building an e-commerce website. I find myself with a difficulty. I'm doing the registration form and at this moment I want to check if the email entered by the user already exists in the database so that I can display an error message. however I don't know how to do it. Can you help me please?

Thanks in advance.

mvp_badge
MVP
Solution

Hello Filipe.

First, this is a client action so you shouldn't have multiple server actions being called. Use a single one that calls all of those.

Second, the "existing users" information is on the database, so you should ask in the server action. For instance, your CreateUser action can have a query GetUsersByUsername and then a check if result is empty.
If it is empty, you create. If not, you return "it is duplicated".


Hi Filipe,

You can create a server action to check the email existence in your database

 Please find attached oml

Best Regards

Devendra

EmailCheck.oml

mvp_badge
MVP
Solution

Hello Filipe.

First, this is a client action so you shouldn't have multiple server actions being called. Use a single one that calls all of those.

Second, the "existing users" information is on the database, so you should ask in the server action. For instance, your CreateUser action can have a query GetUsersByUsername and then a check if result is empty.
If it is empty, you create. If not, you return "it is duplicated".


Hi Filipe,

You can create a server action to check the email existence in your database

 Please find attached oml

Best Regards

Devendra

EmailCheck.oml

Thanks!!!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.