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 on perm...
Power Apps
Answered

Filter Gallery on permissions with multiple criteria

(0) ShareShare
ReportReport
Posted on by 95

Hi,

 

I am attempting to update my gallery filters to include additional criteria.

 

The gallery items are currently filtered by:

  • You are the employee with the case,
  • You created it on behalf of another employee,
  • You are the nominated line manager,
  • Your Office Location is “People and Culture”,
  • Drop down reason value,
  • Search text Reference ID,

 

As well as the above, I now also need to add a filter that detects if you are are from the same Department as the employee with the case and your Job Title contains “Admin”. Unlike the originals which are OR statements, these additional filters need to be combined to an AND statement i.e. The Admin Officer from department A can see the case but cannot see the case from department B.

 

I have attempted with adding this statement but my gallery now shows nothing. There is no errors appearing in the app checker though.

 

&& (Office365Users.MyProfile().Department = 'Employee Name'.Department &&

"Admin" in Office365Users.MyProfile().JobTitle

) 

 

 

 

 

With(
 {
 wList:
 Filter(
 'Cases',
 (
 'Created By'.Email = User().Email ||
 'Modified By'.Email = User().Email ||
 'Employee Name'.Email = User().Email ||
 'Line Manager'.Email = User().Email ||
 Office365Users.MyProfile().OfficeLocation = "People and Culture" 
 ) &&
 (
 Office365Users.MyProfile().Department = 'Employee Name'.Department &&
 "Admin" in Office365Users.MyProfile().JobTitle
 ) &&
 (
 ddReason.Selected.Result = "All" ||
 'Reason for notification'.Value = ddReason.Selected.Result
 )
 )
 },
 SortByColumns(
 Search(
 wList,		 
 searchRef.Text, 
 "ReferenceID"
 ),
 "Created", 
 Descending
 )
)

 

 

 

Your help is appreciated!

 

 

UPDATE: Instead of adding && to the start of the additional criteria, I added || which has worked. *rookie mistake*

 

TarenBhutch_0-1644543958229.png

 

Categories:
  • A-Roosevelt Profile Picture
    153 on at

    @TarenBhutch can you create a label and add the function below, lets see if it's  carrying a value?

    Office365Users.MyProfile().Department

    does the label displays anything? 

  • Verified answer
    TarenBhutch Profile Picture
    95 on at

    UPDATE: Instead of adding && to the start of the additional criteria, I added || which has worked. *rookie mistake*

     

    TarenBhutch_0-1644544109135.png

     

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

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard