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

show a sharepoint list field into a label

Hi,

 

I have created a shp list having : username, password and name. Based on this list the users are log in into the app. What I want is after the user enter his credentials, at the welcome screen, to appear into a label the name of the user who logs in based on the shp list.

For ex : username : John, password : randompass; name : John Johny. The text atribute of the label would be : "hello, " & name of the user who logs in, meaning hello John Johny.

 

What formula to use ? I don't want to use the function user();

 

Thank you, your help is appreciated !

1 ACCEPTED SOLUTION

Accepted Solutions

@MF_powerapps ,

What is in your list if you do not want to reference User()? If it references the user with another field as well, you just need a lookup. For instance if you had the email address and name and the user entered their email address, the label would be something like

"Welcome " & 
Lookup(
   YourReferenceList, 
   YourEmailField=YourUserEnteredField.Text
).YourNameField

 

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.

View solution in original post

11 REPLIES 11
WarrenBelz
Super User III
Super User III

Hi @MF_powerapps ,

I actually use this on all my apps - you just need

"Hello " & User().FullName

 

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.

Hi WarrenBelz,

 

Thanks for the info, but as I said in my post, I don't want to use the user() function.  Is there other ways to do this ?

 

Thank you all !

Hi @MF_powerapps ,

I am a little perplexed why you would not want to do this, but if you add the Office365Users connector, you can do this

"Hello " & Office365Users.MyProfile().DisplayName

 

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.

Hi @WarrenBelz ,

 

I think I didn't explained myself correctly. Not anyone from my organization has an office 365 subscription, that's why I approach  this  differently. I have a sharepoint list named 'user credentials' and it has 3 columns : username, password and name of the user.

In my log in page I'm using those credentials stored into my sharepoint list. After the user logged in, a welcome screen appears and it should show a label saying : Hi, name, where name is the 3-rd column from my sharepoint list.

That's why I didn't use Office365Users.MyProfile().DisplayName or user().FullName. 

 

Thank you for your time and help, I really hope that you understand what I want to do now :).

 

 

Thanks @MF_powerapps ,

How does the user log into Power Apps without an Office365 Account? You cannot share the app with anyone without an account.

Hi @WarrenBelz ,

 

That's correct what you are saying, you need to have an o365 account to access the app, but that account could be on at least 2 devices for ex : I could be on my workstation and also on my tablet. On my workstation I am using a username and password from the sharepoint list to log into the app, and on the tablet I can use a different username and password from the same shp list. 

 

But this thread isn't about o365 account it's about how can I retreive a field from a sharepoint list and show it in a label ?

Take another exemple, I could have a product list created in sharepoint, and I want to get a specific field  from column "description" and show it into a label.

 

Thanks for your time helping me. 

Hi @MF_powerapps ,

Yes, but you still have to know who the logged-in user is.

If you have a reference list of users, you still need to refer to either the User() or Office365Users.MyProfile to lookup the reference.

 

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.

Hi @MF_powerapps ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Hi @WarrenBelz ,

 

Your solution is ok, but is not what i want.

 

Thanks. I still need to understand how to display a specific field from a sharepoint list into a label.

 

Have a nice day!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (55,582)