Hi @mcdryburn ,
Try using this code to combine both the conditions in your Items property:
If(
Office365Users.MyProfile().Department = "60152 GTO - Business Readiness Protection",
If(
IsBlank(TextSearchBox1.Text),
Filter('Contact Business Readiness', 'Created By'.Email = Office365Users.MyProfile().Mail || 'Created By'.Department = Office365Users.MyProfile().Department),
Filter(
'Contact Business Readiness',
StartsWith('Status'.Value, TextSearchBox1.Text) ||
StartsWith('Created By'.Department, TextSearchBox1.Text)
)
),
If(
IsBlank(TextSearchBox1.Text),
Filter('Contact Business Readiness', 'Created By'.Email = Office365Users.MyProfile().Mail),
Filter(
'Contact Business Readiness',
StartsWith('Status'.Value, TextSearchBox1.Text) ||
StartsWith('Created By'.Department, TextSearchBox1.Text)
)
)
)
The outer If statement checks if the logged-in user is in the "60152 GTO - Business Readiness Protection" department. If true, it applies the corresponding filter conditions; otherwise, it applies the filter conditions for users not in that department.
Within each branch of the outer If statement, there's another If statement to handle the search functionality. If the TextSearchBox1 is empty, it applies the filter without search criteria; otherwise, it applies the filter with the search criteria.
------------------------------------------------------------------------------------------------------------------------------
If I answered your question, please accept my post as a solution and if you liked my response, please give it a thumbs up.
Thanks!