Predefined Filters

Last published at: 2024-02-06 14:27:01 UTC

Use a predefined filter to search within a subset of data. Define the filter once, and reuse it in a number of places, such as in a DC Job filter, the Overall Job Results, the Embedded Overall Job Results, or in a search in Apex API, Rest API, or the Direct Processing API. 


Predefined filters for custom objects

To use predefined filters for custom objects, you need to configure two additional fields. See How to use a pre-defined filter on a custom object results list‍ for more information on how to set them up.


Predefined Filters are only available in the Premium edition.

You can define one or more predefined filters per object at the DC Setup page, at the "Predefined Filter" tab. 

To manage your predefined filters:

  1. Go to the DC Setup tab.
  2. At left, select the object to manage the filters for.
  3. On the <Object> Setup page, go to tab Predefined Filters.
  4. Add, edit or delete filters.

Adding a new Predefined Filter

Add a new Predefined Filter by clicking the Add Filter  button on the top right of the page. 

Configuring a Predefined Filter

Configure a new or existing predefined filter by adding one or multiple fields to filter on. For each field, define an expression (operator) and a value. Add a new filter field line by clicking the "+" icon. 

Each defined field is referred to by a filter line number, which can be used in filter logic. 

Filter Logic 

By setting a filter logic, you indicate how the filter fields should be applied. Enter the filter line numbers, separated by a filter logic operator (AND or OR), and grouped with brackets. For example, (1 AND 2) OR 3 finds records that match both Filter 1 and Filter 2, or Filter 3.

In the below example, we entered 2 filter lines and created a logic that states that both filter lines should equal the given value: (1 AND 2). With this specific filter logic, only records that qualify for both filter lines will be used.

Editing a Predefined Filter

You can edit an existing predefined filter as explained above. However, do keep in mind that any changes you make will also be applied in places where you set a predefined filter to be used repeatedly, like in a scheduled job, or when a single job is restarted. In these cases the most recent instance of a predefined filter will be used in all future runs.

Apply the filter in an API Search

The filters can be used in the Apex API. The developer name of the filter as shown in the predefined filter overview is needed for this. The following methods in the dupcheck.dc3Api are available for predefined filters.

  • doSearchWithFilter (Sobject objectData, String filterDeveloperName)
  • doSearchWithFilter (Id objectId, String filterDeveloperName)
  • doSearchWithFilter (Map<String, Object> objectData, String objectPrefix, String filterDeveloperName)
  • doDirectProcess(Id recordId, String filterDeveloperName)