Filtration syntax for SharePoint list (On-Premises)

SharePoint Org Chart allows to filter employees using flexible rules. You can specify filtration rule in the configuration wizard, see Org Chart filtration documentation for details.

You can create flexible rules based on User Profile properties or SharePoint list fields. On this page below you can find the list of available operators, functions and parameters you can use in your conditions.

Operators

Filtration expressions can be combined using operators. Each operator as a precedence priority. Here is the list of those expression’s priority

  • primary
  • unary
  • power
  • multiplicative
  • additive
  • relational
  • logical

Logical

These operators can do some logical comparison between other expressions:

or, ||
and, &&

true or false and true

The and operator has more prioroty than the or, thus in the example above, false and true is evaluated first.

Relational

=, ==, !=, <>
<, <=, >, >=

[Total] < 2000

Additive

+, -

[Total] + [Tax] > 3000

Multiplicative

*, /, %

[Price] * [Quantity] == [Total]

Bitwise

& (bitwise and), | (bitwise or), ^(bitwise xor), << (left shift), >>(right shift)

[Field1] >> [Field2] > 5

Unary

!, not, -, ~ (bitwise not)

not true

Primary

(, )
values

2 * ( [Field1] + [Field2] )

Functions

 

NameDescriptionUsageResult
AbsReturns the absolute value of a specified number.Abs(-1)1M
AcosReturns the angle whose cosine is the specified number.Acos(1)0d
AsinReturns the angle whose sine is the specified number.Asin(0)0d
AtanReturns the angle whose tangent is the specified number.Atan(0)0d
CeilingReturns the smallest integer greater than or equal to the specified number.Ceiling(1.5)2d
CosReturns the cosine of the specified angle.Cos(0)1d
ExpReturns e raised to the specified power.Exp(0)1d
FloorReturns the largest integer less than or equal to the specified number.Floor(1.5)1d
IEEERemainderReturns the remainder resulting from the division of a specified number by another specified number.IEEERemainder(3, 2)-1d
LogReturns the logarithm of a specified number.Log(1, 10)0d
Log10Returns the base 10 logarithm of a specified number.Log10(1)0d
MaxReturns the larger of two specified numbers.Max(1, 2)2
MinReturns the smaller of two numbers.Min(1, 2)1
PowReturns a specified number raised to the specified power.Pow(3, 2)9d
RoundRounds a value to the nearest integer or specified number of decimal places. The mid number behaviour can be changed by using EvaluateOption.RoundAwayFromZero during construction of the Expression object.Round(3.222, 2)3.22d
SignReturns a value indicating the sign of a number.Sign(-10)-1
SinReturns the sine of the specified angle.Sin(0)0d
SqrtReturns the square root of a specified number.Sqrt(4)2d
TanReturns the tangent of the specified angle.Tan(0)0d
TruncateCalculates the integral part of a number.Truncate(1.7)1

It also includes other general purpose ones.

NameDescriptionUsageResult
inReturns whether an element is in a set of values.in(1 + 1, 1, 2, 3)true
ifReturns a value based on a condition.if(3 % 2 = 1, true, false)true
ContainsReturns true if the first string contains the second.Contains(’1234′, ’23′)true
MatchIndicates whether the specified regular expression (second argument) finds a match in the specified input string (first argument).Match(’1298-673-4192′, ‘^[a-zA-Z0-9]\d{2}[a-zA-Z0-9](-\d{3}){2}[A-Za-z0-9]$’)true

Values

A value is a terminal token representing a concrete element. This can be:

  • field
  • token
  • an integer
  • a floating point number
  • a date time
  • a boolean
  • a string
  • a function

Field or user profile property

Use internal name or display name of the field or of the user profile property in square brackets

[Title]
[Job Title]
[Department]

Integers

They are represented using numbers.

123456

They are evaluated as Int32.

Floating point numbers

Use the dot to define the decimal part.

123.456 
.123

They are evaluated as Decimal.

Scientific notation

You can use the e to define power of ten (10^).

1.22e1 
1e2 
1e+2 
1e-2 
.1e-2

They are evaluated as Double

Dates and Times

Must be enclosed between sharps.

#2013/02/13# // for en-US culture

They are evaluated as DateTime. Forms Designer uses the current Culture to evaluate them.

Booleans

Booleans can be either true or false.

true 
false

Strings

Any character between single quotes ‘ are evaluated as String.

'hello'

You can escape special characters using \\, \’, \n, \r, \t.

Function

A function is made of a name followed by braces, containing optionally any value as arguments.

Abs(1) 
Contains([Department], 'Marketing')

See the functions list for details.