All pages
Powered by GitBook
1 of 19

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Division /

Operator: /

The Division operator / is used to divide one value by another.

The values can be of the following type:

  • number

  • duration

This function is SQL compatible. For more information about SQL compatibility, see our .

Returns a new value that is the result of the division of value1 by value2.

The type of the resulting value is dependent on the types of value1 and value2:

value1 / value2

35 / 7 => 5

'12d' / 24 => 12 hours

'1m' / '1s' => 60

number / number returns a number

  • duration / number returns a duration

  • duration / duration returns a number

  • 10 / 0 => unknown
    documentation

    Operators

    An alphabetical list of all expression operators.

    Equality =

    Operator: =

    The Equality operator = is used to check whether two values are equal.

    The values can be of any type, as long as the operator is applied to values of the same type.

    In case of text-comparison, the equality check ignores cases (upper/lowercase) and diacritics (accents).

    This function is SQL compatible. For more information about SQL compatibility, see our documentation.

    Returns Yes when Value1 is equal to Value2

    Returns No when Value1 is not equal to Value2

    If any of the parameters is unknown, the result is unknown.

    value1 = value2

    35 = 35 => Yes

    "Hello World?" = "Hello, World" => No

    "abcde" = "ABCDE"

    Equality-strong ==

    Operator: ==

    The Strict- or Strong Equality operator == is used to check if one text "strictly" equals another text. This check is case-sensitive and also checks diacritics (accents).

    This strong equal check is done using double equal-signs "==" and can only be used to compare text values.

    This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

    Returns Yes if text_a strictly equals text_b.

    Returns No if text_a is not strictly equal to text_b.

    text_a == text_b

    "Hello World?" == "Hello, World" => No

    "abcdEFGê!" == "abcdEFGê!" => Yes

    "abcdEFGê" == "abcdEFGe"

    Logical-and &, and

    Operator: & , and

    The logical operator & (and) checks if two conditions both evaluate to true. The operators & and and can both be used and are exactly the same.

    If used together with the logical or operator, the precedence is important: and takes precedence over or. We strongly advice to use (parentheses) to correctly group these logical statements.

    This function is SQL compatible. For more information about SQL compatibility, see our .

    The result is a Yes/No value, depending on the check

    • if Condition1 evaluates to true AND Condition2 evaluates to true, only then

    condition1 & condition2

    (6=6) & ("Hello world" = "Hello world") => Yes

    false & false => No

    false & true

    condition1 and condition2

    (6=6) and ("Hello world" = "Hello world") => Yes

    false and true or false => No

    false and true or true

    Less-than <

    Operator: <

    The Less Than operator < is used to compare two values and to check whether a value is less than the other. The < operator can be used to compare values of the following types:

    • text

    Power ^

    Operator: ^

    The Power operator (or exponentiation) ^ is used to calculate a number raised to a given power.

    There is also a Power Function that can be used: .

    This function is NOT SQL compatible. For more information about SQL compatibility, see our .

    If-unknown ?

    Operator: ?

    The If-Unknown operator ? checks whether a value is unknown.

    If the value is not unknown (it has a specific value), that value is returned. If it is unknown, the second value is returned.

    The If-Unknown operator can be used on any WEM-type: all WEM-types can be unknown - so they also can be checked for unknown and in that case the second operand should be used. Both operands must be of the same type.

    Addition +

    Operator: +

    The Addition operator + is used to add several values.

    The values can be of the following type:

    • text

    Modulo %

    Operator: %

    The modulo operator % gives the remainder of a division.

    WIKI:

    This function is NOT SQL compatible. For more information about SQL compatibility, see our .

    => Yes
    => No

    number

  • duration

  • datetime

  • concept

  • reference

  • This function is SQL compatible. For more information about SQL compatibility, see our documentation.

    The result of the < operator is true or false. The result is True whenValue1 is less than or equal to Value2. The result is False when Value1 is not less than or equal to Value2.

    • number <= number

    • text <= text returns (alphabetical comparison, case insensitive)

    • datetime <= datetime

    • duration <= duration

    • concept <= concept (applies to the order of concepts)

    • reference <= reference

    If any of the operands is unknown, the result is also unknown. If operands are not of the same type, the "expression type mismatch" warning is displayed.

    value1 < value2

    35 < 35 => No

    234 < 2345 => Yes

    "text1" < "text2" => Yes

    Today() < UTCNow() => Yes

    '12d' < '350m' => No

    'Product categories'.'Monitor' < 'Product categories'.'Phone' => Yes (in the order of concepts, Monitor comes first)

    [Data.CurrentUser] < [OtherUser] => Yes (if current-user-id < other-user-id)

    This function is SQL compatible. For more information about SQL compatibility, see our documentation.

    Returns Value1 if it is not unknown. Otherwise Value2 is returned.

    value1 ? value2

    text ? "Please enter a value" =>If `text` is unknown then the result is "please enter a value". If `text` is not unknown then `text`' is the result.

    unknownnumber ? 0 => 0

    unknowntext ? "some text" => "some text"

    unknownboolean ? false => false

    unknowndatetime ? Now() => result of now() - current date and time

    unknownconcept ? 'concept1' => 'concept1'

    unknownreference ? [CurrentUserRef] => [CurrentUserRef]

    "" ? 0 => expression type mismatch

    number

  • duration

  • datetime

  • concept

  • concept_set

  • This function is SQL compatible. For more information about SQL compatibility, see our documentation.

    Returns a new value that is the result of adding value1 and value2.

    The type of the resulting value is dependent on the types of value1 and value2:

    • text + text returns a text

    • number + number returns a number

    • duration + duration returns a duration

    • datetime + duration returns a datetime

    • concept + concept returns a concept_set

    • concept + concept_set returns a concept_set

    • concept_set + concept_set returns a concept_set

    value1 + value2

    "Hello" + ", " + "world" => "Hello, world"

    15 + 8 + 7 => 30

    '1d' + '6h' + '30m' => 1 day, 6 hours and 30 minutes

    Today() + '1d' => tomorrow

    'concept1' + 'concept2' => { 'concept1', 'concept2' }

    Yes
    is returned.
  • all other evaluations result in No

  • => No

    true & true => Yes

    true & "text" => expression type mismatch

    => Yes

    (false and true) or true => Yes

    false and (true or true) => No

    documentation

    Returns a number that is the result of number1 raised to a given power (number2).

    If any of the operands is an unknown-number, the result is unknown. If any of the operands is not a number, expression editor yields a type mismatch warning.

    value1 ^ value2

    3 ^ 3 => 27

    1234 ^ 1234 => infinity

    -0.5 ^ 0.5 => Not a Number (NaN)

    3 ^ "e" => expression type mismatch

    Pow(value, power)
    documentation

    Returns a number that is the remaining result after number1 is divided by number2.

    number1 % number2

    37 % 7 => 2

    25 % 0 => NaN (not a number)

    25 % '1d' => expression type mismatch

    http://en.wikipedia.org/wiki/Modulo_operation
    documentation

    Subtraction -

    Operator: -

    The subtraction operator - is used to subtract several values. The values can be of the following type:

    • number

    • duration

    • datetime

    • concept-set

    This function is SQL compatible. For more information about SQL compatibility, see our .

    Returns a new value that is the result of subtracting value2 from value1. The type of the resulting value depends on the types of value1 and value2:

    • number - number returns a number

    value1 - value2

    37 - 7 => 30

    '1d' - '12h' => 12 hours

    Today() - '2d' => day before yesterday

    Inversion -

    Operator: -

    The inversion operator - is applied to a value in order to negate the value. The value can be of the following type:

    • number

    • duration

    This function is SQL compatible. For more information about SQL compatibility, see our .

    Returns the inversed (reversed) value of value. When the values before and after the inversion are combined in an addition, the result should be zero.

    -value

    -5 + 5 => 0

    -(5+5) => -10

    -('12d') => 0 seconds (duration on itself cannot be negative)

    Unequality <>

    Operator: <>

    The Unequality <> operator is used to compare two values and to check whether these values are not equal. The <> operator can be used to compare values of any type - though the compared values must be of the same type -

    This function is SQL compatible. For more information about SQL compatibility, see our documentation.

    The result of the <> operator is a Yes/No. The result is Yes when compared values are not equal. The result is No when compared values are equal.

    value1 <> value2

    37 <> 7 => Yes

    "Some Text" <> "Some other Text" => Yes

    Now() <> Today()

    Multiplication *

    Operator: *

    The multiplication operator * is used to multiply several values. The values can be of the following type:

    • number

    => Yes

    false <> true => Yes

    1234 <> 1234 => No

    "1234" <> 1234 => expression type mismatch

    duration

    This function is SQL compatible. For more information about SQL compatibility, see our documentation.

    Returns a new value that is the result of multiplying value1 and value2. The type of the value depends on the types of value1 and value2:

    • number * number returns a number

    • number * duration returns a duration

    • duration * number returns a duration

    value1 * value2

    37 * 7 => 259

    24 * '1h' => 1 day

    '2m' * 30 => 1 hour

    '1d' * '2h' => expression type mismatch

  • duration - duration returns a duration

  • datetime - duration returns a datetime

  • concept-set - concept-set returns a concept-set

  • { 'concept1', 'concept2', 'concept3'} - { 'concept1', 'concept3' } => { 'concept2' }

    '1d' - 12 => expression type mismatch

    documentation
    Today() + (-'12d')
    => 12 days before today
    documentation

    Logical-not !, not

    Operator: ! , not

    The logical operator ! , not can be used to inverse a logical condition or boolean value (Yes/No). If the condition evaluates to unknown, the inverse is also (still) unknown.

    The operators ! and not can both be used and are exactly the same.

    This function is SQL compatible. For more information about SQL compatibility, see our .

    Returns a value that is the inverse of the original condition.

    !condition

    !True => No

    ! (true or false) => No

    ! (true and false) => Yes

    not condition

    not True => No

    not (true or false) => No

    not (true and false) => Yes

    Greater-than-or-equal >=

    Operator: >=

    The Greater Than Or Equal operator >= is used to compare two values and to check whether a value is greater than, or equal to the other. The >= operator can be used to compare values of the following types:

    • text

    number

  • duration

  • datetime

  • concept

  • reference

  • This function is SQL compatible. For more information about SQL compatibility, see our documentation.

    The result of the >= operator is true or false. The result is True whenValue1 is greater than or equal to Value2. The result is False when Value1 is not greater than or equal to Value2.

    • number >= number

    • text >= text returns (alphabetical comparison, case insensitive)

    • datetime >= datetime

    • duration >= duration

    • concept >= concept (applies to the order of concepts)

    • reference >= reference

    If any of the operands is unknown, the result is also unknown. If operands are not of the same type, the "expression type mismatch" warning is displayed.

    value1 >= value2

    35 >= 35 => Yes

    1234 >= 2345 => No

    "text2" >= "text1" => Yes

    (Today() + '1d') >= UTCNow() => Yes

    '12d' >= '20m' => Yes

    'Product categories'.'Monitor' >= 'Product categories'.'Phone' => No (in the order of concepts, Monitor comes first)

    [Data.CurrentUser] >= [OtherUser] => Yes (if current-user-id >= other-user-id)

    ! (unknownboolean) => unknown

    ! 123 => expression type mismatch

    documentation

    Greater-than >

    Operator: >

    The Greater Than operator > is used to compare two values and to check whether a value is greater than the other. The > operator can be used to compare values of the following types:

    • text

    • number

    • duration

    • datetime

    • concept

    • reference

    This function is SQL compatible. For more information about SQL compatibility, see our .

    The result of the > operator is true or false. The result is True whenValue1 is greater than Value2. The result is False when Value1 is not greater than Value2.

    value1 > value2

    35 > 35 => No

    1234 > 2345 => No

    "text2" > "text1"

    Logical-or |, or

    Operator: | , or

    The logical operator | (or) checks if at least one of two conditions evaluates to true. The operators | and or can both be used and are exactly the same.

    If used together with the logical and operator, the precedence is important: and takes precedence over or. We strongly advice to use (parentheses) to correctly group these logical statements.

    This function is SQL compatible. For more information about SQL compatibility, see our .

    Returns a Yes/No value, depending on the check

    • If Condition1 and Condition2 both evaluate to false, then No

    condition1 | condition2

    (6=6) | ("Hello world" = "Hello world") => Yes

    false | false => No

    false | true

    condition1 or condition2

    (6=6) or ("Hello world" = "Hello you") => Yes

    false and true or false => No

    false and true or true

    Less-than-or-equal <=

    Operator: <=

    The Less Than Or Equal operator <= is used to compare two values and to check whether a value is less than, or equal to the other. The <= operator can be used to compare values of the following types:

    • text

    number

  • duration

  • datetime

  • concept

  • reference

  • This function is SQL compatible. For more information about SQL compatibility, see our documentation.

    The result of the <= operator is true or false. The result is True whenValue1 is less than or equal to Value2. The result is False when Value1 is not less than or equal to Value2.

    • number <= number

    • text <= text returns (alphabetical comparison, case insensitive)

    • datetime <= datetime

    • duration <= duration

    • concept <= concept (applies to the order of concepts)

    • reference <= reference

    If any of the operands is unknown, the result is also unknown. If operands are not of the same type, the "expression type mismatch" warning is displayed.

    value1 <= value2

    35 <= 35 => Yes

    1234 <= 345 => No

    "text1" <= "text2" => Yes

    Today() <= UTCNow() => Yes

    '12d' <= '350m' => No

    'Product categories'.'Monitor' <= 'Product categories'.'Phone' => Yes (in the order of concepts, Monitor comes first)

    [Data.CurrentUser] <= [OtherUser] => Yes (if current-user-id <= other-user-id)

    number > number

  • text > text returns (alphabetical comparison, case insensitive)

  • datetime > datetime

  • duration > duration

  • concept > concept (applies to the order of concepts)

  • reference > reference

  • If any of the operands is unknown, the result is also unknown. If operands are not of the same type, the "expression type mismatch" warning is displayed.

    => Yes

    (Today() + '1d') > UTCNow() => Yes

    '12d' > '20m' => Yes

    'Product categories'.'Monitor' > 'Product categories'.'Phone' => No (in the order of concepts, Monitor comes first)

    [Data.CurrentUser] > [OtherUser] => Yes (if current-user-id > other-user-id)

    documentation
    is returned.
  • if Condition1 or Condition2 evaluates to true, then Yes is returned.

  • => Yes

    true | "text" => expression type mismatch

    => Yes

    (false and true) or true => Yes

    false and (true or true) => No

    documentation