Rules: IF Types

This type of rule can only be used with Rules: THEN Types. IF type rules make use of multiple different functions or "Types". This article will outline each of those types with a brief description of what each one is.

The logic behind these rules works as follows: IF this THEN do this, so without a THEN type rule, the IF statement has nothing to actually execute.

The IF portion of the rule first checks for something specific and will next execute the THEN portion of your rule.

Types of IF Rules

  • comparison: This allows you to perform comparisons on data based on the defined operator. Set the option (operator) to one of the following to compare the selected field against the target.
    • gt/gte = greater than/greater than or equal
    • lt/lte = less than/less than or equal
    • eq = equal
  • exactMatchTest: Test if the selected field matches against the target. Will not test boolean types (i.e. true/false).
    • This just checks to make sure that the field in question contains the specified value before applying your ‘THEN’ type portion of the rule.
  • indexOf: Returns true if the selected field contains the target.
    • This is used when searching for strings of text.
    • Maybe the company name varies but there are constants, this will allow you to create a rule to make things more consistent.
  • inverseRegexTest: Use a regex pattern along with a regex flag to test against the selected field, returns true if there is no match.
    • This allows you to filter out records with varying values.
    • You can choose to apply your ‘THEN’ type rule to records that do not meet the criteria defined in this rule.
    • Google is a great resource for more information on regEx flags.
  • regexTest: Use a regex pattern along with a regex flag to test against the selected field.
    • This looks for values that match your defined pattern and applies the ‘THEN’ type portion of your rule.
    • inverseRegExTest does the opposite and is applied when the values do not match your defined pattern.
  • isSet: Returns true if the selected field is defined and is true or length is greater than zero.
    • This is just looking to ensure that something is populated in the defined field.
  • notDefined: Returns true if the selected field is not defined, the field is false or its length is zero.
    • When this condition is met, it will apply the "THEN" type portion of your rule.
  • math: Set the operator to one of (add, sub, multi, div). Returns true if field <Operator> value is equal to the target.
    • This is an infrequent "IF" type rule request because the practical application of it is difficult.
    • Usually buyers (VMS companies) will post things as they should but maybe a client needs to add a couple hours to the work day or take money off the hourly rate.