Understanding Search Criteria

You create search criteria in the Advanced Find dialog:

To create a search criterion you have to, first, choose the type of objects All information in Vine is stored in the server database as named objects of different types. Examples: a company, a person, an event, a sales case. to be returned by the search and then construct search conditions for object's fields.

Search criteria

When you click the Find button, Advanced Find retrieves objects from the database in accordance with your search criterion.

A search criterion can consist of up to 10 logical conditions which can be combined by logical operations AND/OR.

Logical Conditions

A logical condition is an elementary unit of a criterion. It specifies:

When the entered value is not valid, the field’s background has yellow color:

This condition needs an existing company entered in the third edit field. That's why the field’s background is yellow.

You can add or remove logical conditions by clicking the Plus or Minus buttons, respectively.

Use “All objects” as a condition if you want to find all objects of a specific type.

Elementary Constraint Types

A constraint on a field restricts values for that field. The following types of constraints are available:

  • Is means that the field must have exactly the specified value.

  • Is Not means that the field can have any other value but not the specified.

  • Contains means that the field must include the value as sub-string.

  • Is smaller than means that the field's value must be smaller than the given value. For instance, string "abc" is less than strings "abcd" or "b"

  • Is greater than means that the field's value must be greater than the given value. For instance, string "abc" is greater than "ab"

Logical Operations

Logical operations combine multiple conditions into a single search criterion. Two operations are available:

  • OR operation - makes a union of the results of two conditions. OR instructs Advanced Find to retrieve all database objects which satisfy either of the two conditions:

Example: This search will return all persons whose last name is either Moore or Demo.

Find Persons which have Lastname Is 'Moore' OR Lastname Is 'Demo'

  • AND operation - makes an intersection of the results of two conditions – applies to a pair of constraints and instructs Advanced Find to retrieve all database objects which satisfy both of the two constraints:

Example: The search will return all persons whose last name is Moore and first name is LIsa.

Find Persons which have Lastname Is 'Moore' AND Firstname Is 'Lisa'

The AND condition has precedence over OR condition. Advanced Find evaluates AND conditions before OR conditions if no parentheses are used.

Example:

Find Persons which have Lastname Is 'Moore' OR Lastname Is 'Demo' AND Firstname Is 'Lisa'

The search will first find all persons that have last name Demo and first name Lisa and only then will add the objects that have Lastname Moore. This order can be changed with parentheses.

Parentheses

Parentheses ( ) change the normal order of evaluation because conditions enclosed in parentheses are evaluated first. No parentheses are allowed within other parentheses.

Find  Persons  which have  (Lastname Is  'Moore' OR Lastname Is 'Demo' ) AND Firstname Is 'Lisa'

This search will first retrieve all persons whose last name is either Moore or Demo and then will leave in this set only those persons whose first name is Lisa.

Using parentheses is a good practice since parentheses clarify criteria and improve readability.

You can set parentheses only in the Extended mode. Select a parenthesis checkbox where you want to set a parenthesis. Note that Advanced Find helps you to correctly set parentheses: it monitors how you set them and disables the checkboxes where parentheses do not make sense.

The Find button will be disabled until you set parentheses correctly.

Connection Checkbox

The Connection checkbox is available only in the Extended mode. Selecting this checkbox you can find all objects having a specific connection to a set of objects found in the same query In Vine Marketing, a query is a complex database search that retrieves information from the Vine database. A query consists of phases..

For instance, let's say, you want to locate all owners of companies located in Helsinki. What you need to do is build a query that will first find all companies from Helsinki and then find all persons connected to these companies as owners. You can do it with a single search in the Extended mode:

  1. Choose the type of objects you want to finally locate, i.e. Persons.

  2. Select Connection and choose the connection type you want found objects to have, i.e. Company-Owner.

  3. If you want to retrieve persons connected to companies located in Helsinki, you have to set the IS 'Helsinki' constraint on the City field of companies.

You can check the help text at the bottom of the Advanced Find dialog.