Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The Floor()
function rounds down to the closest integral number (integer number without decimals) smaller than or equal to the given number.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns the closest integral value that is smaller than or equal to number
.
Returns Invalid expression
if the parameter is not a valid number.
number
numeric
a numeric value.
Floor(5)
5
Floor(5.999)
5
Floor(-123.89)
-124
The Ceiling()
function rounds a number up to an integral value (integer number without decimals) larger than or equal to the given number.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns the closest integral value that is larger than or equal to number
.
Returns Invalid expression
if the parameter is not a valid number.
number
numeric
a number
Ceiling(5)
5
Ceiling(5.0001)
6
Ceiling(123.123)
124
Ceiling(-123.89)
-123
The Cos()
calculates the cosine of a given radian value.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns cosine of number
Returns invalid expression
if the parameter has no value or is not a valid number.
rad
numeric
a number given in unit of radians
cos(1)
0.5403023059
cos(Pi)
-1
cos(Pi/2)
0
The Round()
function rounds a number.
Rounding a number can be done according to different strategies when it comes to the mid-point cases (like x.5).
WEM supports the Banker's Rounding strategy as default option because of its statistical superiority and standard use in financial and statistical operations.
From Runtime 4.2 an optional strategy parameter is added to this function. It allows 2 keywords, ToEven (which is default) and AwayFromZero, (new option) that can be set as optional 3rd parameter in the expression if the AwayFromZero strategy is the desired Rounding feature for your application.
Mind, this only applies to the Mid-Point values: the middle of the spectrum, where a decision needs to be made which way to go. So if you expect 3.85 to be rounded to 3.9 (away from zero), you need to use the AwayFromZero in the expression - the default ToEven will result in 3.8 (Banker's).
Read this wiki page about rounding strategies.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a number that is rounded to an integral number or a number of fractional digits.
Returns Invalid expression
if one of the parameter values is not a valid number.
number
numeric
a number
digits
numeric
the number of fractional digits number
is rounded.
strategy
keyword
ToEven
(default) or AwayFromZero
(Runtime 4.2 only!)
Round(5.499)
5
Round(5.501)
6
Round(3.85, 1)
3.8
Round(5.489, 2)
5.49
Round(5.499, 2)
5.50
Round(3.85, 1)
3.8
Round(3.85, 1, ToEven
)
3.8 in Runtime 4.2 invalid expression in older runtimes
Round(3.85, 1, AwayFromZero
)
3.9 in Runtime 4.2 invalid expression in older runtimes
The Log10()
function calculates the base-10 logarithm of a given number.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns the base-10 logarithm of number
.
Returns Invalid expression
if the parameter value is not a valid number.
number
numeric
a numeric value.
Log10(0)
(no value)
Log10(100000)
5
Log10(0.00005)
-4.3010299957
Log10(-20)
(no value)
The Abs()
function takes the absolute value of a number.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns an absolute number
Returns Invalid expression
if the parameter is not a valid number.
number
numeric
a number
Abs(123.456)
123.456
Abs(-123.456)
123.456
Abs(1.23456*10^6)
1234560
The Distance()
function returns the geographical distance (in kilometers - as the crow flies) between two points of (latitude
,longitude
).
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Returns the geographical distance (in kilometers - in a straight line) between two geographical points.
Returns Invalid expression
if one of the parameter values is not a valid number.
The Log()
function calculates the natural logarithm (base e
) of a given number, or calculates the logarithm of a number by specified base.
Read .
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Returns the logarithm of a givennumber
, using base e
or a specified base number.
Returns Invalid expression
if one of the parameter values is not a valid number.
The Pow()
function calculates a number to the power of another number.
The can also be used to do power-calculation.
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Returns a number
.
Returns Invalid expression
if one of the parameter values is not a valid number, and returns unknown
if one of the parameters is unknown.
Log(5)
1.6094
Log(25, 5)
2
Log(5, 25)
0.5
number
numeric
a numeric value.
base
numeric
a numeric value.
number
numeric
a number
power
numeric
a number
Pow(1, 0)
1
Pow(0, 1)
0
Pow(2, 3)
8
Pow(0.5, -0.5)
1.4142135624
Pow(-0.5, 0.5)
NaN (not a number)
Pow(1234, 1234)
infinity
latitude1
numeric
a geographic coordinate that specifies the north–south position of a point on the Earth's surface in decimal degrees.
longtitude1
numeric
a geographic coordinate that specifies the east-west position of a point on the Earth's surface decimal degrees.
latitude2
numeric
a geographic coordinate that specifies the north–south position of a point on the Earth's surface in decimal degrees.
longtitude2
numeric
a geographic coordinate that specifies the east-west position of a point on the Earth's surface decimal degrees.
Distance(52.370216, 4.895168, -37.814, 14496332)
16545.7337
The Exp() function calculates the e-number
raised to the power n, where n is an number.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a number.
Returns Invalid expression
if the parameter is not a valid number.
number
numeric
a numeric value.
Exp(0)
1
Exp(-0.6)
0.548812
Exp(-1000)
0
Exp(10)
22026.4658
The Random()
generates a random number.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a random integral number between 0 or a specified minimum value, and a maximum value.
Returns Invalid expression
if one of the parameter values is not a valid number, or is a negative number, or when a maximum value is 0, or when the maximum value is less than the specified minimum value or 0 when only the maximum is specified.
As of version 4.2, the Random function also accepts negative numbers when both min and max values are provided - just as long as min < max.
max_num
numeric
the maximum value of the generated number.
min_num
numeric
the minimum value of the generated number.
The Sin()
function calculates the sine of a number given in radians.
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Returns the sine of a number.
Returns Invalid expression
if rad
has no value.
The Sqrt()
function calculates the square root of a number.
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Returns a number that is the square root of a givennumber
.
Returns Invalid expression
if the parameter is not a valid number.
The ToNumber()
converts a value to a number.
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Note: this function uses the language setting of a portal when converting text.
Returns the number converted from text
or a unit from date
.
Returns Invalid expression
when text
is not a number, or when reference
is not a valid RowId, or when date
is not a valid date value or unit
is not a valid date unit.
text
text
a text containing a number.
reference
reference
reference field, holding a rowid of a list.
date
date
a date.
unit
text
the unit that is retrieved from date
.
rad
numeric
a number given in unit of radians.
Sin(0)
0
Sin(Pi/2)
1
Sin(1)
0.8414709848078965
number
numeric
a number.
Sqrt(100)
10
Sqrt(9)
3
Sqrt(2)
1.4142135623731