cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rajestic
Level: Powered On

User Already Exists

Hey PowerUsers,

 

i made an register page where users types data and it is submitting the form to the SQL Server dbo.Login 

 

the simple code i use now is : SubmitForm(Form1);Navigate(Login,ScreenTransition.Fade)

 

my question is how can i check that the users can create an account with the same email.

 

example user id 1 has 123@gmail.com          user id 2 wants 123@gmail.com as well but then it needs to say Email already taken  

 

Greetings,

Eddy

2 ACCEPTED SOLUTIONS

Accepted Solutions
Meneghino
Level 10

Re: User Already Exists

Hi @Rajestic

You can disable the submit button and make a label appear (through the label Visible property) if:

 

!IsEmpty(Filter(dbo.Login, EmailColumn=TextInputEmail.Text))

Hope this is clear, but please let me know if it is not

View solution in original post

Meneghino
Level 10

Re: User Already Exists

Hi @Rajestic

 

I fully understand, that is what I am proposing.

 

You need to make the DisplayMode property of the button to be something like this:

If(IsEmpty(Filter(dbo.Login, EmailColumn=TextInputEmail.Text)), DisplayMode.Edit, DisplayMode.Disabled)

Same with the visible property of label that says "User already exists"

View solution in original post

5 REPLIES 5
Meneghino
Level 10

Re: User Already Exists

Hi @Rajestic

You can disable the submit button and make a label appear (through the label Visible property) if:

 

!IsEmpty(Filter(dbo.Login, EmailColumn=TextInputEmail.Text))

Hope this is clear, but please let me know if it is not

View solution in original post

Rajestic
Level: Powered On

Re: User Already Exists

hi @Meneghino,

 

the button needs to stay because if users press the button they are creating an account ''Row in SQL Server'' 

the only thing what i need is that the users cant use the same mail to login.

 

for example  if i create a account with mail = rajestic@mail.com 

and you create a account with mail = rajestic@mail.com 

 

then the application needs to say user already exists with that mail please use another.

 

Greetings,

Eddy

Meneghino
Level 10

Re: User Already Exists

Hi @Rajestic

 

I fully understand, that is what I am proposing.

 

You need to make the DisplayMode property of the button to be something like this:

If(IsEmpty(Filter(dbo.Login, EmailColumn=TextInputEmail.Text)), DisplayMode.Edit, DisplayMode.Disabled)

Same with the visible property of label that says "User already exists"

View solution in original post

Rajestic
Level: Powered On

Re: User Already Exists

Hi @Meneghino

 

thank you very much man it worked 

 

I really appreciate it

 

Greetings,

 

Eddy

Meneghino
Level 10

Re: User Already Exists

You are welcome, see here for some other ideas:

https://baizini-it.com/blog/

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,996)