•••
 
Documentation   /   Reference: syntax   /   Match types
 
 

Match types

 

Match types compare a value with a test. They're used in:

Workflow filters:   ---filter1|filter:answer {MATCH_TYPE} {value}
Logic statements:   [[IF=variable_name({MATCH_TYPE} {value})]]...[[ENDIF]]
Dynamic fields:     ---hide_if:variable_name({MATCH_TYPE} {value})

Options

Match type True when the value...
EQUALS {value} equals the test
NOT_EQUALS {value} doesn't equal the test
LESS_THAN {value} is less than the test
GREATER_THAN {value} is greater than the test
LESS_THAN_OR_EQUALS {value} is less than or equal to the test
GREATER_THAN_OR_EQUALS {value} is greater than or equal to the test
MATCH {regex} matches the regular expression
NOT_MATCH {regex} doesn't match the regular expression
IS_BLANK is empty. Workflow filters only.
IS_NOT_BLANK isn't empty. Workflow filters only. 0 isn't blank.

How comparisons work

  • Match types are written in capitals.
  • EQUALS and NOT_EQUALS ignore upper and lower case.
  • Currency symbols, and the commas in numbers, are ignored, so £1,500 compares as 1500.
  • MATCH and NOT_MATCH take a regular expression. To check whether the value contains some text, just write the text: MATCH Ltd. Add flags with FLAG(): MATCH limited FLAG(i) ignores case.
  • The test value can contain variables: GREATER_THAN {{budget}}.
  • In IF and NOT statements, test for blank values with [[NOT=variable]] instead of IS_BLANK.

Examples

---filter1|filter:answer GREATER_THAN_OR_EQUALS £25000
---filter1|outcome:needs_sign_off

[[IF=company_name(MATCH (Ltd|Limited)$ FLAG(i))]]a private limited company[[ENDIF]]

---hide_if:has_vat(NOT_EQUALS Yes)

Data feed filters

The live data feed filter parameter uses its own lowercase match types, including date ranges. See API: Live data feeds.