Stay organized with collections Save and categorize content based on your preferences.

The matches_filter function can be used in custom filters and custom fields to determine whether the value of a field matches a filter expression.


matches_filter(field, `filter expression`)

The matches_filter function applies the filter expression to the field and returns Yes if the value in the field matches the filter expression or No if it does not.


This example returns Yes in a custom field if the invoice date is less than 30 days old:

matches_filter(${billing.invoice_date}, `30 days`)

Use the if function with matches_filter to return different values. The next example shows syntax of a custom field that returns "Late" if the invoice date is over 30 days old:

if(matches_filter(${billing.invoice_date}, `30 days`), "Current", "Late")

Things to know

The string that defines the filter expression must be enclosed in backtick (`) characters.