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 / Can't Filter Sharepoin...
Power Apps
Unanswered

Can't Filter Sharepoint source based on Choice column to populate Gallery

(1) ShareShare
ReportReport
Posted on by 574

Hi all!

 

I am trying to populate a Gallery's Items based on a check and a Filter function:

If(EmployeeEmailAddress = "user@mail.com", Filter(source, SharePointChoiceColumn, "SharePointChoiceColumnValue"))

 but it seems to have issues and it is not working.

I have tried the following which works:

Filter(source, SharePointChoiceColumn, "SharePointChoiceColumnValue")

So this tells me that the If statement is the issue here... But why?

I need to be able to check based on my EmployeeEmailAddress value what records to get from SharePoint.

 

Something between these lines is what i want (nested checks):

If(EmployeeEmailAddress = "user@mail.com", Filter(source, SharePointChoiceColumn, "SharePointChoiceColumnValue"), If(EmployeeEmailAddress = "anotherUser@mail.com", Filter(source, SharePointChoiceColumn, "AnotherSharePointChoiceColumnValue")))

 

Can anyone suggest me a way of achieving what i want and explain why this is not working?

Kind regards!

Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hey I know this is a super old post, so I'm mostly posting this in case anyone arrives here from a search engine, but you can achieve this by altering your formula as that is not a standard Filter formula, and then also by altering your if statement.

     

    Currently your if statement only returns a value when true, and when false it would be null, so we can replace that with a Filter that 

     

    If(
     EmployeeEmailAddress = "user@mail.com", 
     Filter(source, SharePointChoiceColumn = "SharePointChoiceColumnValue"),
     Filter(source, ID = -1)
    )

     

    It's worth also mentioning that the Email address must be the same case format in your formula, i.e. tom@tom.com is not equal to Tom@tom.com - you can get around that by using the Lower() function to convert them both to lowercase.

     

    Cheers,

    Sancho

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 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard