In Aptify, entities that utilize filter rules have an embedded link to the Filter Rules entity. (See Creating Embedded Objects.) Also, the Filter Rule UI control appears on the form for each container entities. This control displays the standard, intuitive filtering dialog with which a user can construct simple or complex filtering rules.

The example shown below illustrates a filter rule that has been constructed for a Product Prices record. This rule applies a discount price if one of the Ship To and Bill To parties is associated with a particular company (Company ID 1928) and the current Quantity Available for the product is greater than 1000 units.

Filter Rules Example
Since Filter Rules is an embedded link to ProductPrices, the specifics of the filter rule shown above is stored in the Filter Rules service and not directly in the ProductPrices sub-type record.

The filter rule information shown above is actually stored in the Filter Rules record shown below. Note that a user or administrator should never modify the Filter Rules record directly; any applicable changes should be made within the container record.


Filter Rules Record
Each filter statement, referenced in the Logic String field, corresponds to a sub-type record stored on the Filter Rule Items tab (shown below).


Filter Rule Items Tab

There may be situations where an organization wants to specify a certain date range without having to specify a specific date. For example, when wanting to offer a reduced price when someone registers for a meeting 30 days before the start of the meeting. Aptify supports the ability to use the following date keywords as values for date related filter rules:

  • NOW
  • TODAY
  • GETDATE()

For example, a value TODAY - 30 for the OrderDate field would return all orders that were placed within the last 30 days.

 

The Filter Rules infrastructure includes three services that appear in the Aptify Framework Administration application by default: