Skip to content
flowon.com

Expression language

Logic and control functions

Reference for If Condition, And, Or, the comparison functions and the value checks that build conditions.

Conditions decide what your logic does: whether a validation passes, which branch a flow takes, which path a business process follows. This page covers the functions you build conditions from:

  • Control: If Condition.
  • Boolean Logical Operators: And and Or. The security checks in the same category are on Users and security.
  • Binary Logical Functions: comparisons between two values.
  • Unary Logical Functions: checks on one value, such as “is empty”.

For choosing between more than two results, see Switch. For “one of these values” and ranges, see Is One Of and Is Between.

If(condition, valueIfTrue, valueIfFalse)Returns Type of the two values

Returns one of two values, depending on a condition. The outline labels its slots If, Then and Else.

Parameter Type Required Description
Condition Yes/No Yes What to check.
Then Any Yes The result when the condition is Yes.
Else Same type as Then Yes The result when the condition is No.
  • Both results must have the same type.
  • An empty condition counts as No, so the Else value is returned.
  • For numbers and Yes/No, the result is never empty: an empty result becomes 0 or No.

Examples

  • If(revenue > 1000000, "Enterprise", "SMB") sets an account’s segment.
  • If(IsNumeric(new_employeecount), ToInteger(new_employeecount), 0) reads a text field safely.

To choose between more than two results, nest another If Condition in the Else slot, or use Switch, which is easier to read.

And(condition1, condition2, …)Returns Yes/No

Returns Yes when every condition is Yes.

Parameter Type Required Description
Conditions Yes/No Yes, at least two The conditions to check.
  • An empty Yes/No counts as No.
  • Conditions are checked in order, and checking stops at the first No. Put an “is not empty” check first, so later conditions only run when the value exists.

Example: And(Not Null(parentcustomerid), parentcustomerid.creditonhold = Yes) safely checks whether the customer of an order is on credit hold.

Or(condition1, condition2, …)Returns Yes/No

Returns Yes when at least one condition is Yes.

Parameter Type Required Description
Conditions Yes/No Yes, at least two The conditions to check.
  • An empty Yes/No counts as No.
  • Checking stops at the first Yes.

Example: Or(prioritycode = High, Customer.customertypecode = Preferred Customer) routes a case to the priority queue.

To combine And and Or, nest one inside the other in the outline. For example And(statecode = Open, Or(prioritycode = High, escalated = Yes)).

The comparison functions are in the Binary Logical Functions category. Each takes two values, labelled First value and Second value (or Compared with), and returns Yes/No. The formula bar shows them as operators or words between the values.

value1 = value2Returns Yes/No
value1 ≠ value2Returns Yes/No

Checks whether two values are the same (or different).

  • Text is compared case-sensitively: “Contoso” and “contoso” are not equal. To ignore case, compare Lowercase(...) of both values.
  • Numbers are compared by value, so a Whole Number 5 equals a Decimal Number 5.0. An empty number counts as 0.
  • Lookups are equal when they point to the same row of the same table.

Example: customertypecode = Competitor excludes competitors from a campaign.

Is Greater Than / Is Greater Than Or Equal To

Section titled “Is Greater Than / Is Greater Than Or Equal To”
value1 > value2Returns Yes/No
value1 ≥ value2Returns Yes/No

Compares numbers or dates. A later date is greater. An empty number counts as 0.

Example: estimatedvalue ≥ 50000 sends large opportunities for approval.

value1 < value2Returns Yes/No
value1 ≤ value2Returns Yes/No

Compares numbers or dates. An earlier date is less. An empty number counts as 0.

Example: followupby < Now finds cases whose follow-up date has passed.

text contains searchReturns Yes/No

Checks whether a text contains another text.

  • Matching ignores case: "Contoso Ltd" contains "contoso" is Yes.
  • Non-text values are compared as text. Empty text counts as "".

Example: description contains "refund" tags cases that mention a refund.

text starts with searchReturns Yes/No

Checks the start of a text. Matching ignores case.

Example: ticketnumber starts with "CAS" checks a reference format.

text ends with searchReturns Yes/No

Checks the end of a text. Matching ignores case.

Example: emailaddress1 ends with "@contoso.com" identifies internal contacts.

list includes itemReturns Yes/No

Checks whether a list holds an item. Works with lists of text, numbers, lookups and choices.

  • A missing list gives No for Contains Item.
  • For text, Contains Item is case-sensitive: a list holding “Billing” does not contain “billing”.

Example: Case.Categories includes "Billing" routes billing cases to the finance team. For a multi-select choice, new_interests includes Golf finds contacts interested in golf.

The checks are in the Unary Logical Functions category. Each takes one value and returns Yes/No. Viewers and decision-table cells read them as words: Null and Null Or Empty String read “is empty”, their opposites read “is not empty”, and Is True and Is False read “is Yes” and “is No”.

Null(value)Returns Yes/No
Not Null(value)Returns Yes/No

Null is Yes when the value is empty; Not Null is the opposite. Use them before arithmetic and comparisons when “no value” and “zero” mean different things.

  • A value that can never be empty, such as a constant, always gives No for Null.

Example: Null(parentcustomerid) finds contacts without a parent account.

Null Or Empty String / Not Null Or Empty String

Section titled “Null Or Empty String / Not Null Or Empty String”
Null Or Empty String(text)Returns Yes/No
Not Null Or Empty String(text)Returns Yes/No

Null Or Empty String is Yes when a text is empty or "". Not Null Or Empty String is the opposite.

  • Text with only spaces is not empty. To treat " " as empty, check Trim(value).

Example: Not Null Or Empty String(Trim(emailaddress1)) makes sure a contact has a usable email address before sending a confirmation.

Is True(value)Returns Yes/No
Is False(value)Returns Yes/No

Is True is Yes only when the value is Yes. Is False is Yes when the value is No or empty.

Example: Is False(donotemail) includes contacts in a mailing unless they opted out. Contacts who never answered (empty) are included too; add Not Null(donotemail) with And if you need an explicit answer.

Any(list)Returns Yes/No

Returns Yes when a list has at least one item.

  • An item counts even when it is itself empty.
  • A missing or empty list gives No.

Example: Any(Filter(Case.Activities, a, a.statecode = Open)) checks whether a case still has open activities before it is closed.

In a decision table, each condition cell checks the value of its column, so you only pick the comparison and the value. These checks are in the Functions category and read like = "Business", > 1000, starts with "CAS" or is not empty. They follow the same rules as the comparisons and checks above. See Checking a single value.