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

Automatically show data from SharePoint list when a user login to app

Hello,

 

I'm trying to build a Leave_Request App  for my company. So far so good, but i'm trying to solve a problem. I want to insert a text area, where the remaining days of the employees should appear. In fact, when a user login in the app, this specific area should automatically show the remaining days of the employee that logged in. I already made a Sharepoint list where there is a column of the employee names and one column with the remaining days. Can you help me please? Here is a screenshot with the app so far.

 

ChristosKarak_0-1605015495034.png

 

 

Thank you in advance,

 

Christos

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

Maybe you can try LookUp(RemainingDays,UserName=User().FullName,RemainingDays), the UserName in the formula is the column name in your SharePoint List, and RemainingDays is the column name in your SharePoint List as well.

View solution in original post

To resolve the delegation warning issue, you need to create a collection. On your home page or click on your app, then choose

"Onvisible"

, and create a formula:

ClearCollect(col_RemainingDays,RemainingDays)

 and then change your formula to:

LookUp(col_RemainingDays,UserName=User().FullName,RemainingDays)

View solution in original post

8 REPLIES 8
Wayne_A
Advocate III
Advocate III

If this is on a Form, trying adding the Field separately into it's own data card - it should be fine if it's already in the SP list?

Hello, thank you for your answer. The app is not on a Form, i'm trying to build it from scratch. When the user logs in, the name appears with User().FullName, and beside it i want to show automatically the remaining days of the specific user.

Maybe you can try LookUp(RemainingDays,UserName=User().FullName,RemainingDays), the UserName in the formula is the column name in your SharePoint List, and RemainingDays is the column name in your SharePoint List as well.

Hello Jacky, thanks for the answer! I think your answer is working, but a new issue appeared, a Delegation warning.

ChristosKarak_0-1605088814942.png

 

I tried to solve it with the instruction in the article (upgrading the value to 2000 etc), but it didn't help. Sorry if the answer is easy, but i'm new to PowerApps. Do you know how to solve this new issue?

 

@ChristosKarak 
Delegation warnings do not always have a simple answer.
But there are usually a way to overcome it. Does the thread below help?
https://powerusers.microsoft.com/t5/Power-Apps-Pro-Dev-ISV/SharePoint-Lookup-Column-Id-Subfield-Filt...

 

To resolve the delegation warning issue, you need to create a collection. On your home page or click on your app, then choose

"Onvisible"

, and create a formula:

ClearCollect(col_RemainingDays,RemainingDays)

 and then change your formula to:

LookUp(col_RemainingDays,UserName=User().FullName,RemainingDays)

Greetings again,

 

The delegation warning issue is resolved, thank you very much! But still, no data are displayed on the text that i want to show the Remainingdays of the employees. Maybe i should change the field where i write the code? I have currently placed it in the  Default field: the code is  LookUp(col_EmployeesList, Title=User().FullName, ΥΠΟΛΟΙΠΟ) where ΥΠΟΛΟΙΠΟ is the RemainingDays and created a collection as you said and it worked. But no data are displayed. Can you help me please? Maybe i should change the Insert value where i want the data to be displayed? For example, i have a text field where i want the data to be displayed.

Thanks, it worked perfectly! 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,284)