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*
