If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Understanding the Anatomy of a Filter Statement

The Filters tab allows users to specify one or more filter statements that define the records that will appear in the view.

Each filter statement has the following components:

When creating a filter, you must specify values from left to right; the values in subsequent columns change based on the previous selections.

Filters -Window with Sample Filter -Statement

Service

In the Service column, you select the service which will serve as the data source for this filter statement. In most cases, this is the service whose records the view will display. Selecting another service allows the view to be filtered by data in a related service. For example, a view showing all people who have placed orders since the beginning of the year displays records from the Persons service, but the filter is based on information from the Orders service.

For each service, you can also create a filter statement with either Record History, Lists, or Topic Codes selected as the Service. A view with this filter statement will display records that are linked to Record History, Lists, or Topic Codes records. For example, if you want to create a view of employees that appear in a particular list, then you would select Lists as the Service and enter a statement of ListID = [enter ID]. Or, if you want to display people who have the Business topic code selected, you would select Topic Codes as the Service and enter a statement of Topic Code Exactly Matches Business.

When filtering on Topic Codes, Aptify automatically returns active links only and ignores inactive links. 

 

Note that the list of options in the Services drop-down list may vary from service to service depending on the configurations set by your system administrator.

Filter Based on a Related Service

Field

In the Field column, you select the field that filters the data from a list of fields in the selected service. For example, if you want to filter Persons records based on company affiliation, you would select Company from the Field drop-down list. Or, if you want to filter Contact Log records based on date, you would select Date from the Field drop-down list. Note that not all fields may display in this list, depending on how your system administrator has configured the service.

Operator

In the Operator column, you select the type of logic for the filter. The operator compares the value of the selected Field for each record in the service with the contents of the Value column. For example, to create a filter that returns all Contact Log records whose date is greater than January 1, 2005, the operator would be greater than (>).

The available options in the Operator drop-down list vary depending on the type of Field selected (not all options may be available for all fields, depending on how your administrator has configured the service). Note that in order to view available options in the Operator drop-down list, you must first specify a Field. Also, for more information on the Proximity operator, see Using the Proximity Search Wizard.

Field Type

Operators Available

Type of Comparison

Character

Exactly Matches

Field column value exactly matches the characters entered in the Value column.

 

Contains

Field column value contains the characters entered in the Value column. The characters can appear anywhere in the field.

 

Begins With

Field column value begins with the characters entered in the Value column.

 

Ends With

Field column value ends with these characters entered in the Value column.

 

Does Not Contain

Contents lists in the Value column to do appear anywhere in the Field column value.

 

In List

Field column value matches one of the values in the Values column; each value is separated by a comma.

 

Is Blank

Field column value contains no data (that is, the value is NULL).

 

Is Not Blank

Field column value contains any data (that is, the value is not NULL).

 

Between

Field column value is between the characters entered in the Value column,

 

Proximity

Applicable only when Field column value is set to Postal Code. Launches the Aptify Proximity Search Wizard. See Using the Proximity Search Wizard for details.

Numeric/Date

=

Equals

 

< >

Does not equal

 

>

Greater than

 

<

Less than

 

>=

Greater than or equal

 

<=

Less than or equal

 

Is Blank

Field column value contains no data (that is, the value is NULL).

 

Is Not Blank

Field column value contains data (that is, the value is not NULL).

 

In List

Field column value matches one of the values in the Values column; each value is separated by a comma.

 

Between

Field column value is between the values in the Value column.

Value

In the Value column, you enter characters, a phrase, or a number that the system will use as the basis for the filter. The Value field uses the operator selected in the Operator column to determine the type of match. For example, to create a filter that returns the Contact Log records whose date is greater than January 1, 2005, you would enter 1/1/2005 as the Value.

In general, you manually enter text or numbers into the Value column, but, in some cases, the Filters tab provides you with additional options to facilitate selection:

  • If you select a field that uses the Datetime format from the Field drop-down list, an ellipsis () button appears in the Value field. Clicking this button opens a Date Selection Box.
  • For the date-based filter, the use of NOW, TODAY, and GETDATE() should all retrieve the current date. You can further manipulate that by adding plus or minus a specific number of days. For example, OrderDate >= TODAY-7 will retrieve records with an order dated within the last week.
  • If you select a field that has a defined list of possible values in the Field column (such as a Person's State), the Value field includes a drop-down list with these values. You can either select a value from the drop-down list or manually enter a value in the field.
  • If you select a field that is linked to another service from the Field drop-down list (for example, filtering based on CompanyID in a Persons view), an ellipsis () button appears in the Value field. Clicking this button opens a Link Box to the related service.
  • When Between is selected as the Operator of a filter statement, an ellipsis (…) button appears in the Value field. Clicking the button will display the Select a Range dialog and a user can input the appropriate range as shown below:

Select a Range Dialog

  • If you select a field that has no defined list of values in the Field column, a list of the first 100 possible values may appear in the Value field. Note that these possible values are only a suggestion: Only the first 100 values appear in the list, even if the field contains more than 100 values. If the field contains less than 100 values, then all of the values appear in the list. You can either select a value from the drop-down list or manually enter a value in the field.
    • Note that this feature is designed for character-based fields. It does not apply to fields with the following data types: text, ntext, varchar(max), nvarchar(max), datetime, or numeric.

 

The feature that displays the first 100 possible values when specifying view filters is enabled by default in Aptify but your administrator can enable it for the entire system or on a per-entity basis. See Setting the View and Find Suggested Value List Attributes for details

Copyright © 2014-2017 Aptify - Confidential and Proprietary