cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Adam51
Frequent Visitor

Creating a "Sign In Page" using data from an Excel formatted Table

I'm trying to create a login page for a student project using credentials that are stored in an excel table. The data has already been formatted into a table ('Capture') and has already been linked to the "data" section of PowerApps. The code used in the screenshot 'Capture2' is what I found from other tutorials. 'Capture3' is the text I want to be displayed to the user upon an unsuccessful Login however it seems to pop up regardless even when the correct user credentials are inserted into the text inputs. I am unsure where to go from here

5 REPLIES 5
LRVinNC
Resident Rockstar
Resident Rockstar

The problem is the way the email address is coming in.  I created a similar table.  If you you look at the data actually in the table, you will see that Excel is appending mailto: on the front of each email address. 

PW1.jpg

This appears to occur even if you enter the email address as text, not a hyperlink.  So the easy solution to this is to simply append this same value to the text entered.

 

If(Concatenate("mailto:", TextInput1.Text) in Table1.UserID && TextInput2.Text in Table1.UserPassword, Set(GoodPW, true), Set(GoodPW, false))

 

This results in a successful match (as indicated by the value of GoodPW being set to true) when email1@test.com and Password1 are entered in the two text blocks.  I display OK when true and Not OK when false to validate.

PW2.jpg

 

 

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Adam51
Frequent Visitor

I added the new code to the 'OnSelect' function however the label I have set to display when there is an unsuccessful login still displays even though the textinput1 matches the data within the excel document

LRVinNC
Resident Rockstar
Resident Rockstar

Use the formula bar to view exactly what PowerApps is seeing.  Go to you button OnSelect and then highlight the Table1.UserID portion.  It should bring up a small > pointing down.  Click to expand and you should see exactly what has been loaded from the table.  
pwe.jpg

 

Repeat with the TextInput field to see exactly what PowerApps thinks is in the two fields. 
Then repeat, if necessary with the Password fields.
Send me screenshots if that doesn't show you the disconnect.

 

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Adam51
Frequent Visitor

(I changed UserEmail to UserID in excel and PowerApps before this screenshot was taken thinking it could be a naming issue)

Despite there being a successful connection between the excel dataset and PowerApps, it is displaying that no data could be found. I deleted the connection then re-established it however the same issue persists

LRVinNC
Resident Rockstar
Resident Rockstar

I  believe that is because your actual column name in the excel file is UserEmail, not UserID.  UserID was what I used in my test file.  Try modifying the formula to replace UserID with UserEmail and then try this again.

 

 

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,717)