cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

How to check list CDS entity list in powerapps

Hello !

how to check CDS entity list.

My scenario is that one login page is there where user has to enter their name , email and password and this all will be saved into CDS entity.

After this whenever they try to login second time user has to provide email id and password if it matches then only it should allow you to navigate to different screen.

So to check this email and password is matching or not what should we do ?

 

How can we check CDS list that whether email and password is matching or not?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi Saurabh-704:

Firstly, I would like to confirm with you whether my following understanding is correct:

  • Registration is required when the user logs in to the app for the first time.
  • After the user submits the registration information, these data are stored in the CDS entity.
  • When the user logs in for the second time, check his email address and password, and if it matches the data in the database, navigate to sceen1.

Secondly,I assume that the feathers that I mentioned above are what you want, here is my solution for your reference:

My entity:

MYAccounts

Fields:

Name(Primary field)-Text

emailaddress-Text

password-Text

step1:add a welcome screen(Welcome)

1\add two text input controls(TextInput1/TextInput2)

One for email address and one for password

2\add a label control and set it’s property:

Text: "I want to register an account"

OnSelect :Navigate(Registered)   /* Registered is the Registered screen*/

3\add a button control and set it’s property:

Text: "sign in"

OnSelect:

 

If(
    LookUp(
        MYAccounts,
        emailaddress = TextInput1.Text
    ).password = TextInput2.Text,
    Navigate(screen1),
    Notify("Wrong account or wrong password!")
)

 

 

1.jpg

 

Step2:add a Registered screen(Registered)

1\ add three text input controls(TextInput3/TextInput4/TextInput5)

One for email address ,one for password, one for name

2\add a button control and set it’s property:

Text: "Registered"

OnSelect: 

 

If(
    IsEmpty(
        LookUp(
            MYAccounts,
            emailaddress = TextInput5.Text
        )
    ),
    Collect(
        MYAccounts,
        {
            Name: TextInput3.Text,
            password: TextInput4.Text,
            emailaddress: TextInput5.Text
        }
    );
    Navigate(Welcome),
    Notify("The account already exists")
)

 

 

2.jpg

 

Step3:add a screen(screen1)

It is the different screen (“it should allow you to navigate to different screen”)

 

After the user opens the app, they can enter their email address and password to log in or register for a new account.

Case1:If the email address and password are correct, the user can navigate to screen1.

Case2:If the email address or password are wrong, a banner message("Wrong account or wrong password!") will pop up to the user at the top of the screen.

If the user chooses to register for an account, they will navigate to the registration screen. After filling in the registration information, users can click Register to complete the registration.

Case1:If this email address is already registered, a banner message("The account already exists") will pop up to the user at the top of the screen.

Case2:If this email address isnt already registered, the application will save the information to the CDS entity and then navigate to the welcome screen

 

Best Regards,

Bof

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi Saurabh-704:

Firstly, I would like to confirm with you whether my following understanding is correct:

  • Registration is required when the user logs in to the app for the first time.
  • After the user submits the registration information, these data are stored in the CDS entity.
  • When the user logs in for the second time, check his email address and password, and if it matches the data in the database, navigate to sceen1.

Secondly,I assume that the feathers that I mentioned above are what you want, here is my solution for your reference:

My entity:

MYAccounts

Fields:

Name(Primary field)-Text

emailaddress-Text

password-Text

step1:add a welcome screen(Welcome)

1\add two text input controls(TextInput1/TextInput2)

One for email address and one for password

2\add a label control and set it’s property:

Text: "I want to register an account"

OnSelect :Navigate(Registered)   /* Registered is the Registered screen*/

3\add a button control and set it’s property:

Text: "sign in"

OnSelect:

 

If(
    LookUp(
        MYAccounts,
        emailaddress = TextInput1.Text
    ).password = TextInput2.Text,
    Navigate(screen1),
    Notify("Wrong account or wrong password!")
)

 

 

1.jpg

 

Step2:add a Registered screen(Registered)

1\ add three text input controls(TextInput3/TextInput4/TextInput5)

One for email address ,one for password, one for name

2\add a button control and set it’s property:

Text: "Registered"

OnSelect: 

 

If(
    IsEmpty(
        LookUp(
            MYAccounts,
            emailaddress = TextInput5.Text
        )
    ),
    Collect(
        MYAccounts,
        {
            Name: TextInput3.Text,
            password: TextInput4.Text,
            emailaddress: TextInput5.Text
        }
    );
    Navigate(Welcome),
    Notify("The account already exists")
)

 

 

2.jpg

 

Step3:add a screen(screen1)

It is the different screen (“it should allow you to navigate to different screen”)

 

After the user opens the app, they can enter their email address and password to log in or register for a new account.

Case1:If the email address and password are correct, the user can navigate to screen1.

Case2:If the email address or password are wrong, a banner message("Wrong account or wrong password!") will pop up to the user at the top of the screen.

If the user chooses to register for an account, they will navigate to the registration screen. After filling in the registration information, users can click Register to complete the registration.

Case1:If this email address is already registered, a banner message("The account already exists") will pop up to the user at the top of the screen.

Case2:If this email address isnt already registered, the application will save the information to the CDS entity and then navigate to the welcome screen

 

Best Regards,

Bof

View solution in original post

Thank you so much @v-bofeng-msft for your time for explaining this concept in details

Hello @v-bofeng-msft !! Thank you for your last solution. I have one more doubt like If user want to reset the password ...like if user click on reset the password..then he gives email Id and username....then he enters new password..so how can we update this new password to that CDS entity fields ..infront of that username?

Thanks in advance!!

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,430)