Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Filter = A and ( B or C )

For a sharepoint list, how does one get the above behavior?

For example, the default behavior would be Filter = A and B or C

Specifically, the desiresed filter is EmplyoeeActive = true AND ( Department = "Sales" OR Department = "Marketing" )

My current filter is returning any employee in sales or marketing, regardless of the the EmployeeActive being true.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Your OR clause must be done first.

Try Department = "Sales" OR Department = "Marketing" AND EmployeeActive=true

share|improve this answer

For more info on how filters work in list views then you could look at this article that I wrote for End User SharePoint.

This basically explains (as did Mike for this specific example) that filters are 'grouped in pairs from the beginning'. Difficult to explain without examples, but hopefully the article linked helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.