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 function set co...
Power Apps
Answered

Filter function set conditional

(0) ShareShare
ReportReport
Posted on by 383

Hello,

 

I want to filter gallery items based on whether a user's email is in a permission's SharePoint list. If not in the permission list, I want to limit the gallery items to only "In-progress" and their own customer email. Otherwise, if in the permission list, I want the user to see all items. I need help writing the conditional logic to add to the filter function under the Items property for the gallery. 

 

Filter( Source,

 

If(IsBlank(LookUp(Permissions,Email=User().Email)), Status.Value = "In-progress"),

 

If(IsBlank(LookUp(Permissions,Email=User().Email)), 'Customer Email' = User().Email)

 

)

 

Categories:
  • WarrenBelz Profile Picture
    156,536 Most Valuable Professional on at

    Hi @Kirsten2 ,

    Try this

    With(
     {
     wAccess:
     !IsBlank(
     LookUp(
     Permissions,
     Email = User().Email
     ).Email
     )
     },
     Filter( 
     Source,
     (wAccess || Status.Value = "In-progress") &&
     (wAccess || 'Customer Email' = User().Email)
     )
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Kirsten2 Profile Picture
    383 on at

    Thanks! This almost works for me. I tried typing in just the customer email as a conditional and I only see that customer email when not on the permission list, which is great!

     

    However, the "in-progress" is not working for me. It might be because I have as part of the filter a dropdown for the status associated with it. Where I say in the filter:

     

    Status.Value = Dropdown2.Selected.Value

     

    Is there a way to make the selected value only "In-progress" for emails not on the permissions list?

     

    When I tried your way above, I didn't get an error for the code associated with 'In-progress", but I didn't get an records appear in the gallery for me when doing that. That's why I think there is an issue with having a dropdown as part of the filter as the problem. I want to keep the dropdown, but have "In-progress" as the only option for emails not on the permission list. 

  • Kirsten2 Profile Picture
    383 on at

    I tried to edit the Item Property of the dropdown, but got an error. 

     

    If(IsBlank(LookUp(Permissions, Email=User().Email)), "In-progress",Choices(Orders.Status))

     

    Error:

    Expected Table value

  • WarrenBelz Profile Picture
    156,536 Most Valuable Professional on at

    HI @Kirsten2 ,

    Sorry but I am not clear exactly what you need - if the user is not in the permissions list, the records are restricted to a Status of "In progress" and their email in 'Customer Email'.

  • Verified answer
    developerAJ Profile Picture
    4,763 on at

     

    With(
     {
     wAccess:
     !IsBlank(
     LookUp(
     Permissions,
     Email = User().Email
     ).Email
     )
     },
     Filter( 
     Source,
     wAccess || Status.Value = "In-progress" || 'Customer Email' = User().Email
     )
    )

     

    if user need to see their records along with in progress records This should work

     

    With(
     {
     wAccess:
     !IsBlank(
     LookUp(
     Permissions,
     Email = User().Email
     ).Email
     )
     },
     Filter( 
     Source,
     (wAccess || (Status.Value = "In-progress" && 'Customer Email' = User().Email)
     )
    )

     

    This is for user records with only inprogress status

     

  • Kirsten2 Profile Picture
    383 on at

    Thanks! This worked. You just forgot one parathesis at the end. Thank you a bunch!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard