Complex filter conditions

EXAMPLE: If you want to filter SharePoint items, based on the following condition:

Department == Marketing AND (Country == Canada OR Country == USA)

Perform the following:

  1. Click Administration » Settings » Advanced » SharepointConnector » <your site name> » List mappings » <your list mapping name> » SharePoint filter and set the logical operator to AND.
  2. Under SharePoint filter, click Filter condition » Create new.
    Fill out the following properties:
    • In Field name, enter Department
    • In Field value, enter Marketing
    • In Default field value, enter Marketing
    • In Comparison operator, enter ==
  3. Under SharePoint filter, click Logical groups » Create new.
    The logical group contains collection of filter conditions and collection of other logical groups. Every logical group has an operator that relates the filter conditions and the nested groups. This allows you to construct complex logical expressions.
  4. Set the group’s logical operator to OR and click Save changes.
    In the tree on the left, a new item appears under Logical groups.
  5. Expand the item and click its Filter conditions » Create new.
    Fill out the following properties:
    • In Field name, enter Country
    • In Field value, enter Canada
    • In Default field value, enter Canada
    • In Comparison operator, enter ==
  6. Click Save changes and click again Create new.
    Fill out the following properties:
    • In Field name, enter Country
    • In Field value, enter USA
    • In Default field value, enter Canada
    • In Comparison operator, enter ==
    • NOTE: When you have a field that appears more than once in the filter, in every appearance the default field value must be the same. In the above example, it must be either Canada or USA. Therefore, when a new item comes from Sitefinity CMS to SharePoint it will have country Canada or USA and the item will pass the filter in future synchronizations.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?