Skip to main content

Boolean Functions

Boolean Functions in FlowOn Logic are built-in utilities that take one or more inputs, which may not necessarily be Boolean, and produce a Boolean result. These functions evaluate conditions, comparisons, or logical operations and return either 'true' or 'false' based on the defined criteria.

These Boolean functions fall under different categories, including Binary Logical Functions, Control Functions, and Unary Logical Functions, each serving specific purposes within the broader realm of Boolean logic.

Binary Logical Functions

Contains SubString

Return true if a string contains the specified substring; otherwise, it returns false.

   ContainsSubString('<String>', '<Substring>')
ParameterRequiredTypeDescription
StringYesStringThe String to check.
Sub StringYesStringThe Sub String to find.
Return valueBooleantrue when the item is found. false when not found.
  • Example 1

       ContainsSubString("Hello World","Hello")
    Result: true
  • Example 2

       ContainsSubString("Hello World","Dynamics")
    Result: false

Contains Item

Return true if a list contains the specified item; otherwise, it returns false.

ContainsItem([<Collection>], '<Item>')
ParameterRequiredTypeDescription
CollectionYesListThe list to check for the item.
ItemYesAny (String, Number ...)The item to find in the list.
Return valueBooleantrue when the item is found. false when not found.
  • Example 1

       ContainsItem([1, 2, 3, 4, 5], 3)
    Result: true
  • Example 2

       ContainsItem(["apple", "banana", "cherry"], "grape")
    Result: false

Does Not Contain Substring

Return true if a string does not contain the specified substring; otherwise, it returns false.

DoesNotContainSubString('<String>', '<Substring>')
ParameterRequiredTypeDescription
StringYesStringThe String to check.
Sub StringYesStringThe Sub String to find.
Return valueBooleantrue when the item is not found. false otherwise.
  • Example 1

       DoesNotContainSubString("FlowOn Logic takes Dynamics to the next level by eliminating the need to write code","Microsoft")
    Result: true
  • Example 2

       DoesNotContainSubString("Dynamics 365 is a Microsoft Solution", "Microsoft")
    Result: false

Does Not Contain Item

Return true if the list does not contain the specified item; otherwise, it returns false.

DoesNotContainItem([<Collection>], '<Item>')
ParameterRequiredTypeDescription
CollectionYesListThe list to check for the item.
ItemYesAny (String, Number ...)The item to find in the list.
Return valueBooleantrue when the item is not found. false otherwise.
  • Example 1

       DoesNotContainItem(["Product A", "Product B", "Product C"], "Product F")
    Result: true
  • Example 2

       DoesNotContainItem([55.9,21.6,12.8,75.4], 21.6)
    Result: false

Does Not End With

Return true only if the provided text does not end with the characters you specify.

DoesNotEndWith("<String>", "<Characters>")
ParameterRequiredTypeDescription
StringYesStringThe text to check.
CharactersYesStringThe characters to check for absence at the end.
Return valueBooleantrue when the text does not end with the specified characters. false when it does.
  • Example 1

       DoesNotEndWith("FlowOn Logic", "End")
    Result: true
  • Example 2

       DoesNotEndWith("John02", "02")
    Result: false

Does Not Start With

Return true only if the provided text does not start with the characters you specify.

DoesNotStartWith("<String>", "<Characters>")
ParameterRequiredTypeDescription
StringYesStringThe text to check.
CharactersYesStringThe characters to check for absence at the end.
Return valueBooleantrue when the text does not start with the specified characters. false when it does.
  • Example 1

      DoesNotStartWith("Hello World", "Hi")
    Result: true
  • Example 2

      DoesNotStartWith("Built in Functions", "Built")
    Result: false

Ends With

Return true if the provided text ends with the characters you specify.

EndsWith("<String>", "<Characters>")
ParameterRequiredTypeDescription
StringYesStringThe text to check.
CharactersYesStringThe characters to check for at the end of the text.
Return valueBooleantrue when the text ends with the specified characters. false when it doesn't.
  • Example 1

      EndsWith("Lebanon", "on")
    Result: true
  • Example 2

      EndsWith("Saudi Arabia", "Sau")
    Result: false

Is Equal To

Return true if both operands are equal; otherwise, it returns false.

IsEqualTo(<Operand1>, <Operand2>)
ParameterRequiredTypeDescription
Operand1YesAnyThe first operand to compare.
Operand2YesAnyThe second operand to compare.
Return valueBooleantrue when both operands are equal. false when they are not.
  • Example 1

      IsEqualTo(10, 10)
    Result: true
  • Example 2

      IsEqualTo("2023-09-01 15:30:00", "2023-09-02 10:45:00")
    Result: false

Is Greater Than

Returns true if the first operand is greater than, but not equal to, the second operand; otherwise, it returns false

IsGreaterThan(<Operand1>, <Operand2>)
ParameterRequiredTypeDescription
Operand1YesNumeric (Integer, Decimal, Float, Money)The first operand to compare.
Operand2YesNumeric (Integer, Decimal, Float, Money)The second operand to compare.
Return valueBooleantrue when Operand1 is greater than Operand2. false when they are equal or Operand1 is less than Operand2.
  • Example 1

      IsGreaterThan(10, 4)
    Result: true
  • Example 2

      IsGreaterThan(13.5,24.5)
    Result: false

Is Greater Than Or Equal To

Returns true if the first operand is greater than,or equal to the second operand; otherwise, it returns false

IsGreaterThanOrEqualTo(<Operand1>, <Operand2>)
ParameterRequiredTypeDescription
Operand1YesNumeric (Integer, Decimal, Float, Money)The first operand to compare.
Operand2YesNumeric (Integer, Decimal, Float, Money)The second operand to compare.
Return valueBooleantrue when Operand1 is greater than or equal to Operand2. false when Operand1 is less than Operand2.
  • Example 1

      IsGreaterThanOrEqualTo(10, 10)
    Result: true
  • Example 2

      IsGreaterThanOrEqualTo(12.5,22.5)
    Result: false

Is Less Than

Returns true if the first operand is less than, but not equal to, the second operand; otherwise, it returns false

IsLessThan(<Operand1>, <Operand2>)
ParameterRequiredTypeDescription
Operand1YesNumeric (Integer, Decimal, Float, Money)The first operand to compare.
Operand2YesNumeric (Integer, Decimal, Float, Money)The second operand to compare.
Return valueBooleantrue when Operand1 is less than Operand2. false when they are equal or Operand1 is greater than Operand2.
  • Example 1

      IsLessThan(2, 5)
    Result: true
  • Example 2

      IsLessThan(44.6,10.3)
    Result: false

Is Less Than Or Equal To

Returns true if the first operand is less than, or equal to, the second operand; otherwise, it returns false

IsLessThanOrEqualTo(<Operand1>, <Operand2>)
ParameterRequiredTypeDescription
Operand1YesNumeric (Integer, Decimal, Float, Money)The first operand to compare.
Operand2YesNumeric (Integer, Decimal, Float, Money)The second operand to compare.
Return valueBooleantrue when Operand1 is less than or equal to Operand2. false when Operand1 is greater than Operand2.
  • Example 1

     IsLessThanOrEqualTo(5.32, 5.32)
    Result: true
  • Example 2

     IsLessThanOrEqualTo(15, 5)
    Result: false

Is Not Equal To

Returns true if both operands are not equal; otherwise, it returns false

IsNotEqualTo(<Operand1>, <Operand2>)
ParameterRequiredTypeDescription
Operand1YesNumeric (Integer, Decimal, Float, Money)The first operand to compare.
Operand2YesNumeric (Integer, Decimal, Float, Money)The second operand to compare.
Return valueBooleantrue when Operand1 is not equal to Operand2. false when they are equal.
  • Example 1

     IsNotEqualTo(22,11)
    Result: true
  • Example 2

     IsNotEqualTo(15, 15)
    Result: false

Starts With

Returns true if the provided text starts with the characters you specify; otherwise, it returns false.

StartsWith("<String>", "<Characters>")
ParameterRequiredTypeDescription
StringYesStringThe text to check.
CharactersYesStringThe characters to check for at the beginning of the text.
Return valueBooleantrue when the text starts with the specified characters. false when it doesn't.
  • Example 1

      StartsWith("Lebanon", "Leb")
    Result: true
  • Example 2

      StartsWith("Saudi Arabia", "Arab")
    Result: false

Control Functions

AND

The AND operator specifies that all statements must be true for the expression to evaluate as true.

<Condition1> AND <Condition2>
OperatorDescription
ANDSpecifies that both Condition1 and Condition2 must be true for the expression to evaluate as true.
  • Example 1

(ContainsSubString("Hello World","Hello") AND IsEqualTo(10, 10)) Result: true


- Example 2
```csharp

(IsGreaterThan(55.2,24.5) AND StartsWith("Saudi Arabia", "Arab"))
Result: false

OR

The OR operator specifies that any of the OR statements can be correct for the expression to evaluate as true.

<Condition1> OR <Condition2>
OperatorDescription
ORSpecifies that either Condition1> or Condition2 (or both) must be true for the expression to evaluate as true.
  • Example 1
    (IsGreaterThan(55.2,24.5) OR  IsLessThan(32, 5))
    Result: true

- Example 2
```csharp

(IsGreaterThan(1,4) OR IsLessThan(32, 5))
Result: false

If Condition

The If Condition function returns a designated value if the condition evaluates as true, and a different value if it evaluates as false.

If(<Condition>, <TrueValue>, <FalseValue>)
ParameterRequiredTypeDescription
ConditionYesBooleanThe condition to evaluate.
TrueValueYesAnyThe value to return if the condition is true.
FalseValueYesAnyThe value to return if the condition is false.
Return valueAnyThe value returned based on the evaluation of the condition.
  • Example
    If(DoesNotStartWith("Hello World", "Hi"), "The provided text does not start with Hi", "The provided text starts with Hi")

Unary Logical Functions

Has Any Value

Return true if the provided list contains at least one non-null value.

HasAnyValue([<Collection>])
ParameterRequiredTypeDescription
ListYesListThe list to check for non-null values.
Return valueBooleantrue when the list contains at least one non-null value. false when the list is empty or contains only null values.
  • Example 1
HasAnyValue([1, null, 3, null])
Result: true
  • Example 2
HasAnyValue([null, null, null, null])
Result: false

Is False

Return true if the operand evaluates to false, otherwise, it returns false

IsFalse(<Operand>)
ParameterRequiredTypeDescription
OperandYesBooleanThe operand to evaluate.
Return valueBooleantrue when the operand evaluates to false. false when the operand evaluates to true.
  • Example 1
IsFalse(IsLessThan(12,4))
Result: true
  • Example 2
IsFalse(IsLessThan(2,4))
Result: false

Is True

Return true if the operand evaluates to true, otherwise, it returns false

IsTrue(<Operand>)
ParameterRequiredTypeDescription
OperandYesBooleanThe operand to evaluate.
Return valueBooleantrue when the operand evaluates to true. false when the operand evaluates to false.
  • Example 1
IsTrue(IsEqual(12,12))
Result: true
  • Example 2
IsTrue(IsEqual(2,4))
Result: false

Not Null

Return true if an operand is NOT null, otherwise, it returns false

NotNull(<Operand>)
ParameterRequiredTypeDescription
OperandYesBooleanThe operand to evaluate.
Return valueBooleantrue when the operand is not null. false otherwise
  • Example 1
NotNull(HasAnyValue([55, 12, 3, null]))
Result: true
  • Example 2
NotNull(HasAnyValue([null, null]))
Result: false

Null

Return true if an operand is null, otherwise, it returns false

Null(<Operand>)
ParameterRequiredTypeDescription
OperandYesBooleanThe operand to evaluate.
Return valueBooleantrue when the operand is null. false otherwise
  • Example 1
Null(HasAnyValue(["Elie", "Mohammed", "Ali", null]))
Result: false
  • Example 2
Null(HasAnyValue([null, null]))
Result: true

Not Null Or Empty String

Return true only if a text operand is NEITHER null nor empty, otherwise, it returns false

NotNullOrEmptyString(<Operand>)
ParameterRequiredTypeDescription
OperandYesBooleanThe operand to evaluate.
Return valueBooleantrue when the a text operand is not null nor empty. false otherwise
  • Example 1
NotNullOrEmptyString("John Doe")
Result: true
  • Example 2
NotNullOrEmptyString("")
Result: false

Null Or Empty String

Return true only if a text operand is NEITHER null nor empty, otherwise, it returns false

NullOrEmptyString(<Operand>)
ParameterRequiredTypeDescription
OperandYesBooleanThe operand to evaluate.
Return valueBooleantrue when the a text operand is null or empty. false otherwise
  • Example 1
NullOrEmptyString("Ayla Doe")
Result: false
  • Example 2
NullOrEmptyString("")
Result: true

What's Next

In this section, we've explored various boolean functions in FlowOn logic and learned how to apply them effectively. In the next section, we'll delve into Text functions for further understanding and application.