Skip to content

Using the In Database Function

Using the In Database Function

The 'In Database' and 'Not In Database' functions can be used to set Criteria that isn't available through the Source Table you are starting with, as long as the field links to the selected Source. For example, Mailers must be created in the Members table but you might want to set Criteria from elsewhere, such as Reps. The 'Not In Database' function applies the opposite principle, in that it will pull everyone who is not in the database for these criteria.

How to use this Function:

  1. Add in the Columns and any other Criteria you wish to use in the existing table, as you would do with a normal report.

  2. Add in the linking field as a Criteria - this is usually the main table name id, so in this example it would be 'members.id' as this is how the Rep information links to the Members data.

  3. Select the operator as 'In Database' or 'Not In Database'.

  4. Use the below template to build the query:

    linkingfield, table_name

    fieldintable | operator | value

Note: There should be no spaces in between.


For example:

member_id, reps

start_date | GREATER_THAN | 1561849200

The operators that can be used with the 'In Database' and 'Not In Database' functions are the same as those available in the Operator dropdown within the Criteria section. They can be added into the above template using these:

  • EQUAL
  • NOT_EQUAL
  • GREATER_THAN
  • LESS_THAN
  • IN
  • NOT_IN
  • STARTS_WITH
  • ENDS_WITH
  • CONTAINS

This function is best used on a case by case basis, so if you are unsure on the linkage between data and whether this operator can be used, we would be happy to assist you through the Support Desk.


Updated on 18th December 2019