Friday, June 29, 2012

SharePoint List Filter Logic

When setting up a list view using a filter, I could not figure out the logic between ANDs and ORs.  Finally found this great forum post that explains it very well.

Here is a short excerpt:

Because the boolean operators AND and OR have the same level of precedence, in order to achieve what you want you need to be able to group the expressions like so:

(Lead Writer = [Me] OR Created By = [Me]) AND (Status = Not Started OR Status = In progress)

However, when setting the filters using the UI, SharePoint adds the filters sequentially, so it will interpret this as something like

(((Lead Writer = [Me] OR Created By = [Me]) AND Status = Not Started) OR Status = In progress)

Thanks to Paul Lucas

No comments:

Post a Comment