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 gallery using O...
Power Apps
Unanswered

Filter gallery using Or operator missing rows

(0) ShareShare
ReportReport
Posted on by 49

Hi all, 

 

I've run into a problem where my Filter operator including the Or operator filters out to many rows in my gallery. 

I have a filter which sorts a list of items, and order numbers, and this list should be filtered to see only the ones the user is related to. The user can be related by two fields in which their email is. Below is the code: 

 

SortByColumns(
Filter(
'[app].[v_VR_Voyage]',
Or( User().Email = EmailField1, User().Email = EmailField2
)) ,
"Item" , Ascending
, "OrderNumber" , Descending
)

 

For some reason, some of the order numbers are missing, even though the person in charge of it is on the mailing list. 

 

Does anyone know what I'm doing wrong? 

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

    Hi @C-Jac ,

    User().EMail is not Delegable, but if you do this at App OnStart

    Set(varUserMail,User().EMail)

     then this should work

    SortByColumns(
     Filter(
     '[app].[v_VR_Voyage]',
     EmailField1 = varUserMail || EmailField2 = varUserMail
     ) ,
     "Item" , 
     Ascending, 
     "OrderNumber", 
     Descending
    )

     

    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.

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

    Hi @C-Jac ,

    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.

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 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard