The Step-by-Step section only supports simple contracts like 

  • Name = Test (we add the 'quotes' automatically)
  • Revenue__c >= 10000


More complex constructs can be entered directly in the Filter Condition field in the Source section.

Complex filters include the use of NOT, LIKE, IN, AND, OR, ...


Depending on the filter you want to enter, here a few tips:

  • To get the API name of a column, just select it in the Source Filter Field and check/copy the value in the Filter Condition field
  • Use the Developer Console to develop the where clause (Filter) and then copy it to the Filter Condition Field


Note that the validate function only checks the syntactical correctness.

Make sure that all the column names are listed in the filter columns in the Technical Details section.


Check if the rollup creates the correct value via the Rollup Check component.



Tips

Filter by Lookup

If the filter is based on a lookup, you can use the following construct

CustomLookupField__r.ReferencedField__c


Example (using a standard object):

- only include contacts where the account name starts with U

- Filter condition: Account.Name LIKE 'U%'

- Test query: SELECT Id, Name, Account.Name FROM Contact WHERE Account.Name LIKE 'U%'


Note that the trigger checks if the column was changed. So, if you change the Account in the example above, the change is handled correctly.  Nevertheless, if you change the referenced value (here: account name), you need to execute the Batch update to calculate the values correctly.



Negation

To negate selections of LIKE, IN, etc. you can use the NOT keyword. In contrast to standard SQL, you need to add it to the front of the construct.


Example (using a standard object):

- only include contacts where the account name does not start with U

- Filter condition: NOT(Account.Name LIKE 'U%')

- Test query: SELECT Id, Name, Account.Name FROM Contact WHERE NOT(Account.Name LIKE 'U%')