Examples

The following examples provide some sample expressions.

(AttributeA || AttributeB) && (! AttributeC)

This evaluates to true if the following two conditions are both satisfied: either AttributeA or AttributeB is true, and AttributeC is false.

((Attribute + Attribute2 – Attribute3) * Attribute4 / Attribute5) % Attribute 6

Assuming the following values:

  • Attribute = 1

  • Attribute2 = 2

  • Attribute3 = 1

  • Attribute4 = 5

  • Attribute5 = 2

  • Attribute6 = 4

This evaluates to 1, because 1 + 2 – 1 is 2, multiplied by 5 is 10, divided by 2 is 5, and the remainder of 5 divided by 4 is 1.

Attribute2 == Attribute5

Assuming the same values as the previous example, this evaluates to true, because both Attribute2 and Attribute 5 have the same value, namely the value 2.

max(Attribute6,Attribute5,Attribute4)

Assuming the same values as the previous example, this evaluates to 5, because Attribute4 has a value of 5, which is larger than the values of the other two attributes.

maxindex(Attribute6,Attribute5,Attribute4)

Assuming the same values as the previous example, this evaluates to 2, because Attribute4 has a value of 5, which is larger than the values of the other two attributes, and the zero-based index of Attribute4 in the list of arguments is 2. (Attribute6 has index 0 and Attribute5 has index 1.)

abs(floor(MyNum))

Assuming MyNum is –13.5, this evaluates to 14, because the floor of –13.5 is –14, and the absolute value of –14 is 14.

concat(A,B,C)

Assume the following values:

  • A="One"

  • B="Two"

  • C="Three"

This evaluates to "OneTwoThree".

substring("Attribute1",2,4)

evaluates to "trib".

substring("Attribute1",2,-3)

evaluates to "Att".

cond(X,Y,Z)

Assume the following values:

  • X=false

  • Y=1

  • Z=2

This evaluates to 2, because the Boolean expression in the first argument is false, so the third argument is returned, which is 2.

switch(v1,v2,v3,v4,v5)

Assume the following values:

  • v1=false

  • v2=1

  • v3=true

  • v4=2

  • v5=3

This evaluates to 2, because the first Boolean expression that evaluates to true is the third argument, so the fourth argument is returned.