Examples of Using EXISTS and NOT EXISTS
A query by example that resides in the last name field in the client must use the following format:
EXISTS(Smith)
A predefined query where the Opportunity is the business component must use the following format:
Opportunity.Search = "EXISTS ([Last Name] = ""Smith"")"
A search specification that resides in the Search Specification property of the business component or applet must use the following format:
EXISTS ([Last Name] = 'Smith')
The following example chooses records according to multiple child and grandchild criteria. It defines a more complex query and demonstrates that a query can use all the business components involved in the view without specifying the business component that contains the field:
EXISTS ([ChildField1] = 'X' AND [ChildField2] = 'Y')
EXISTS ([GrandchildField1] = 'A' AND [GrandchildField2] = 'B')
You can add NOT in front of EXISTS to query for everything other than the value that you include after EXISTS.