The Not In operator

The operator Not In returns all instances of objects that do not have the value of the attribute that is specified in the search or do not include the attribute.

Templates and attributes

Unica Plan objects (plans, programs, and projects) are created from templates.

Templates have definitions of attributes, such as brochure_type. Project instances that are created from the same template can have different values for their attributes. For example, TS001 might have Tri-fold defined as its brochure type, and TS002 might have Bi-fold defined as its brochure type.

In a typical Unica Plan installation, there are multiple project templates, and a particular attribute might be present in some templates and absent in others.

The behavior of the Not In operator

For example, if you search for "all fruits that do not have black colored seeds", your search returns fruits that do not have black colored seeds and fruits that are seedless. (Seedless fruits do not have black colored seeds.)

Consider the following example:

  • Template1 has the custom tab Business that contains the attribute BusinessUnit.
  • Template2 does not have the Business custom tab, so it does not contain the BusinessUnit attribute.
  • Two projects are created from Template1:
    • Project1 is created with "Insurance" as the value for BusinessUnit.
    • Project2 is created with "Banking" as the value for BusinessUnit.
  • Two projects are created from Template2: Project3 and Project4.

If you create a search with the following criteria, the search returns Project2, Project3, and Project4 because none of these projects has BusinessUnit = Insurance.

[All Templates] -> [BusinessUnit] -> [Not In] -> [Insurance]