web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter a SharePoint li...
Power Apps
Answered

Filter a SharePoint list to retrieve one specific value

(0) ShareShare
ReportReport
Posted on by 79

Hi Community,

 

I know that this question has passed here quite a few times, but even by reading them and trying to apply it's solutions, I don't get it to work.

 

Scenario:

 

I have a SharePoint list with multiple fields; Employee (Person / group) and Vacation Available (number). 

In my PowerApp, I want to show the vacation days left for the current logged in user.

 

Solution:

 

  1. I created a collection OnVisible of the screen - ClearCollect(CollectionForBalances,LeaveBalance)
  2. I've added a label on the screen and inserted following formula - LookUp(CollectionForBalances,User().Email = Employee.Email,'Vacation Available')

The label returns nothing, a blank. I don't know what I'm doing wrong. Hope someone can shed a light on this.

2020-05-02_15-54-08.jpg
2020-05-02_15-52-03.jpg
Categories:
I have the same question (0)
  • Verified answer
    eka24 Profile Picture
    20,925 on at

    From the leave balance table what i can see is employee, do you also have Employee.Email

     

    If you have Employee.Email then try:
    LookUp(CollectionForBalances, Email,=User().Email ,'Vacation Available')

     

    Or

    If  the employee name matches office 365 fullname then:

    LookUp(CollectionForBalances, Employee=User().FullName,'Vacation Available')

     

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • Verified answer
    CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Your code seems to be ok.

    I'm absolutely  sure that your collection isn't loaded with data, because you are using a single screen and the OnVisible property hasn't been launched even once.

    Check please if the CollectionForBalances collection is loaded via View Menu->Collections.

    If my assumption is correct, you can verify your app by running the app from outside the studio. 

     

    Hope it helps !

  • BenVdP Profile Picture
    79 on at

    @gabibalaban & @eka24 ,

     

    Thanks for your input.

    I managed to get it to work. I changed the formula to LookUp(CollectionForBalances,User().Email in Employee.Email,'Vacation available') and afterwards, thanks to your tip @gabibalaban , I ran the app outside the studio, which then populated my collection.

     

    Again, thanks for your help!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard