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

Re: Custom Login

@yashag2255 

 

They both Text fields (single-line text)

 

 

 

g225 SP.username.JPG

Super User
Super User

Re: Custom Login

Hey @Ash2 

 

The Screenshot added by you says that the name of attribute is SP.Username but the formula uses, Username_Column1 as the column name, are you performing any operations on the data(like column rename on the collection)? If not, please follow the convention as:
 
If(LookUp('User Info','SP.Username'= TextInput1.Text).'SP.Password' = TextInput2.Text,Navigate('Home Screen'),Navigate('Failed to login screen'))
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Ash2
Level: Powered On

Re: Custom Login

@yashag2255 

 

The formula is using the data table that was I added to the app. 

 

sadly it's giving me the same error, how would you set up a list/data table to hold user info to log into an app?

same error.JPG

Super User
Super User

Re: Custom Login

Hi @Ash2 

 

TextInput1 and TextInput2 needs to be replaced with the controls that you are using for entering the Username and Password. I didn't get the point of using a data table to reference this data. You can create a collection o App Start which contains the login information directly from the data source.
 
Expression: App -> OnStart -> ClearCollect(CollectionName, DataSOurceName)
 
This will copy all the values from list to collection and in the lookup formula, instead of using the data source, you can directly use this collection.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Ash2
Level: Powered On

Re: Custom Login

@yashag2255 

 

sorry about that, it's still giving me the same issue.

 

it seems like the PA_LS_Username.Text nor the 'SP.Username' is being picked up. 

 

New2.JPG

Super User
Super User

Re: Custom Login

Hi @Ash2 

 

Can you please confirm if the name of PasswordColumn is SP.Password? It seems that the error is on the column name.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Ash2
Level: Powered On

Re: Custom Login

@yashag2255 

 

it seems to have 2, I tried both of them with the formula you gave before and it still has an issue picking up that column.

 

ThisItem.'SP.Username'

SP.Username_Column1

 

Untitled.png

Super User
Super User

Re: Custom Login

Hey @Ash2 

 

Can you share more details about the use of data table? What is in the  data source for it? 
 
If you do not want user to see this screen and you are using this screen just to get the details in the offline capability, I would suggest you to remove this data table and instead collect all the data in a collection, which can be used once the app is offline. To collect data in collection or showing that in a data table requires the app to be connected to internet so that they can fetch data from the data source. Once this is done, even if the internet goes down, collection will be able to support you with the data until the app comes back online.
 
To do so:
 
Expression to be placed on "OnStart" property of the App: ClearCollect(UserInfoCollection,'SP List Name')
 
The highlighted part needs to be replaced with the actual name of SP list. This will fetch all the columns and records into this collection. This will load data once the app is opened. To run this while you are still in app, you need to select the three dots on the "App" just before your "Login Screen" on the left side tree menu and select "Run OnStart". This will get the values in the collection.
 
Now, the expression to be used on the Login button "OnSelect" property:
If(LookUp(UserInfoCollection,'SP.Username'= TextInput1.Text).'SP.Password' = TextInput2.Text,Navigate('Home Screen'),Navigate('Failed to login screen'))
If(LookUp('User Info','SP.Username'= TextInput1.Text).'SP.Password' = TextInput2.Text,Navigate('Home Screen'),Navigate('Failed to login screen'))
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 228 members 5,163 guests
Please welcome our newest community members: