Directory of functions
Annuaire des fonctions de l'éditeur d'expression
Constants
Constant
Description
Example
True
Represents the Boolean True value.
[InStock] == True
False
Represents the Boolean False value.
[InStock] == False
?
Represents a null reference that does not refer to any object.
[Region] != ?
Operators
Operator
Description
Example
+
Adds the value of one numeric expression to another or concatenates two strings.
[UnitPrice] + 4 + ' ' + [FirstName]
-
Numerical subtraction.
[Price1] - [Price2]
*
Multiplies the value of two expressions.
[Quantity] * [UnitPrice] * (1 - [BonusAmount])
/
Divides the first operand by the second.
[Quantity] / 2
%
Returns the remainder (modulus) obtained by dividing one numeric expression by another.
[Quantity] % 3
|
Performs a bitwise inclusive OR on two numeric expressions. Compares each bit of its first operand to the corresponding bit of its second operand. If either bit is 1, the corresponding resulting bit is set to 1. Otherwise, the corresponding resulting bit is set to 0.
[Flag1] | [Flag2]
&
The bitwise AND operator. Compares each bit of its first operand to the corresponding bit of its second operand. If both bits are 1, the corresponding resulting bit is set to 1. Otherwise, the corresponding resulting bit is set to 0.
[Flag] & 10
^
Performs a bitwise exclusive OR on two numeric expressions.
[Flag1] ^ [Flag2]
==
Returns true if both operands have the same value; otherwise, it returns false.
[Quantity] == 10
!=
Returns true if the operands do not have the same value; otherwise, it returns false.
[Country] != ‘France’
<
Less than operator. Used to compare expressions.
[UnitPrice] < 20
<=
Less than or equal to operator. Used to compare expressions.
[UnitPrice] <= 20
>=
Greater than or equal to operator. Used to compare expressions.
[UnitPrice] >= 30
>
Greater than operator. Used to compare expressions.
[UnitPrice] > 30
In(,,,)
Tests for the existence of a property in an object.
[Country] In (‘USA’, ‘UK’, ‘Italy’)
Like
Compares a string against a template. If the value of the string matches the model, the result is true. If the string does not match the model, the result is false. If the string and the model are empty strings, the result is true. Example: [Name] like '%ma%' returns true if the object [Name] contains my, otherwise returns false.
[Pays] like '%ranc%'
Between (,)
Specifies a range to test. Returns true if a value is greater than or equal to the first operand and less than or equal to the second operand.
[Quantity] Between (10, 20)
And
&&
Performs a logical conjunction on two Boolean expressions.
[InStock] And ([ExtendedPrice]> 100)
Or
||
Performs a logical disjunction on two Boolean expressions.
[Country]==’USA’ Or [Country]==’UK’
Not
!
Performs a logical negation on a Boolean expression.
Not [InStock]
Aggregate functions
Function
Description
Example
Avg(Value)
Returns the average of all the values in the expression.
Avg([Profit])
Count()
Returns the number of values.
Count()
CountNotNull(Value)
Returns a number of non-null objects in a collection.
CountNotNull([Orders])
CountDistinct(Value)
Returns the number of distinct values.
CountDistinct([Orders])
Max(Value)
Returns the maximum value across all records.
Max([Profit])
Median(Value)
Returns the median of the values.
Median([Profit])
Min(Value)
Returns the minimum value across all records.
Min([Profit])
Mode(Value)
Returns the mode of the values.
Mode([Profit]
StdDev(Value)
Returns an estimate of the standard deviation of a population, where the sample is a subset of the entire population.
StdDev([Orders])
StdDevp(Value)
Returns the standard deviation of a population, where the population is the entire data to be summarized.
StdDevp([Orders])
Sum(Value)
Returns the sum of all values.
Sum([Profit])
Var(Value)
Returns an estimate of the variance of a population, where the sample is a subset of the entire population.
Var([Orders])
Varp(Value)
Returns the variance of a population, where the population is the entire data to be summarized.
Varp([Orders])
DateTime functions
Function
Description
Example
AddDays(DateTime, DaysCount)
Returns a date-time value that is the specified number of days from the specified DateTime.
AddDays([OrderDate], 30)
AddHours(DateTime, HoursCount)
Returns a date-time value that is the specified number of hours from the specified DateTime.
AddHours([StartTime], 2)
AddMilliSeconds(DateTime, MilliSecondsCount)
Returns a date-time value that is the specified number of milliseconds from the specified DateTime.
AddMilliSeconds(([StartTime], 5000))
AddMinutes(DateTime, MinutesCount)
Returns a date-time value that is the specified number of minutes from the specified DateTime.
AddMinutes([StartTime], 30)
AddMonths(DateTime, MonthsCount)
Returns a date-time value that is the specified number of months from the specified DateTime.
AddMonths([OrderDate], 1)
AddSeconds(DateTime, SecondsCount)
Returns a date-time value that is the specified number of seconds from the specified DateTime.
AddSeconds([StartTime], 60)
AddTicks(DateTime, TicksCount)
Returns a date-time value that is the specified number of ticks from the specified DateTime.
AddTicks([StartTime], 5000)
AddTimeSpan(DateTime, TimeSpan)
Returns a date-time value that is from the specified DateTime for the given TimeSpan.
AddTimeSpan([StartTime], [Duration])
AddYears(DateTime, YearsCount)
Returns a date-time value that is the specified number of years from the specified DateTime.
AddYears([EndDate], -1)
DateDiffDay(startDate, endDate)
Returns the number of day boundaries between two non-nullable dates.
DateDiffDay([StartTime], Now())
DateDiffHour(startDate, endDate)
Returns the number of hour boundaries between two non-nullable dates.
DateDiffHour([StartTime], Now())
DateDiffMilliSecond(startDate, endDate)
Returns the number of millisecond boundaries between two non-nullable dates.
DateDiffMilliSecond([StartTime], Now())
DateDiffMinute(startDate, endDate)
Returns the number of minute boundaries between two non-nullable dates.
DateDiffMinute([StartTime], Now())
DateDiffMonth(startDate, endDate)
Returns the number of month boundaries between two non-nullable dates.
DateDiffMonth([StartTime], Now())
DateDiffSecond(startDate, endDate)
Returns the number of second boundaries between two non-nullable dates.
DateDiffSecond([StartTime], Now())
DateDiffTick(startDate, endDate)
Returns the number of tick boundaries between two non-nullable dates.
DateDiffTick([StartTime], Now())
DateDiffYear(startDate, endDate)
Returns the number of year boundaries between two non-nullable dates.
DateDiffYear([StartTime], Now())
DateTimeToString(DateTime, format, culture)
Convert a given DateTime to a specified String format.
DateTimeToString([OrderDate], 'dddd d MMMM', 'en-US')
GetDate(DateTime)
Extracts a date from the defined DateTime.
GetDate([OrderDateTime])
GetDateHour(DateTime)
Extracts the date part with the hour value from the defined DateTime.
GetDateHour([OrderDate])
GetDateHourMinute(DateTime)
Extracts the date part with the hour and minute values from the defined DateTime.
GetDateHourMinute([OrderDate])
GetDateHourMinuteSecond(DateTime)
Extracts the date part with the hour, minute, and second values from the defined DateTime.
GetDateHourMinuteSecond([OrderDate])
GetDateWeekYear(DateTime)
Returns the date of the first day of the week for a given DateTime (uses culture settings).
GetDateWeekYear([OrderDate])
GetDateMonthYear(DateTime)
Extracts the date with the month and year from the defined DateTime.
GetDateMonthYear([OrderDate])
GetDateQuarterYear(DateTime)
Extracts the date with the quarter and year from the defined DateTime.
GetDateQuarterYear([OrderDate])
GetDay(DateTime)
Extracts a day from the defined DateTime.
GetDay([OrderDate])
GetDayOfWeek(DateTime)
Extracts a day of the week from the defined DateTime (where Sunday is the first day).
IIF(GetDayOfWeek([OrderDate]) = 4, ‘Weekend’, ‘Weekday’)
GetDayOfYear(DateTime)
Extracts a day of the year from the defined DateTime.
GetDayOfYear([OrderDate])
GetHour(DateTime)
Extracts an hour from the defined DateTime.
GetHour([StartTime])
GetLastDayOfMonth(Date)
Returns the last day of month of the date in parameter
GetLastDayOfMonth(today())
GetMilliSecond(DateTime)
Extracts milliseconds from the defined DateTime.
GetMilliSecond([StartTime])
GetMinute(DateTime)
Extracts minutes from the defined DateTime.
GetMinute([StartTime])
GetMonth(DateTime)
Extracts a month from the defined DateTime.
GetMonth([StartTime])
GetSecond(DateTime)
Extracts seconds from the defined DateTime.
GetSecond([StartTime])
GetTimeOfDay(DateTime)
Extracts the time of the day from the defined DateTime in ticks.
GetTimeOfDay([StartTime])
GetWeekOfMonth(DateTime)
Extracts the week of the month from the defined DateTime.
GetWeekOfMonth([OrderDate])
GetWeekOfYear(DateTime)
Extracts the week of the year from the defined DateTime.
GetWeekOfYear([OrderDate])
GetYear(DateTime)
Extracts a year from the defined DateTime.
GetYear([StartTime])
IsApril(DateTime)
Returns True if the specified date falls within April.
IsApril([OrderDate])
IsAugust(DateTime)
Returns True if the specified date falls within August.
IsAugust([OrderDate])
IsDecember(DateTime)
Returns True if the specified date falls within December.
IsDecember([OrderDate])
IsFebruary(DateTime)
Returns True if the specified date falls within February.
IsFebruary([OrderDate])
IsJanuary(DateTime)
Returns True if the specified date falls within January.
IsJanuary([OrderDate])
IsJuly(DateTime)
Returns True if the specified date falls within July.
IsJuly([OrderDate])
IsJune(DateTime)
Returns True if the specified date falls within June.
IsJune([OrderDate])
IsLastMonth(DateTime)
Returns True if the specified date falls within the previous month.
IsLastMonth([OrderDate])
IsLastYear(DateTime)
Returns True if the specified date falls within the previous year.
IsLastYear([OrderDate])
IsMarch(DateTime)
Returns True if the specified date falls within March.
IsMarch([OrderDate])
IsMay(DateTime)
Returns True if the specified date falls within May.
IsMay([OrderDate])
IsNextMonth(DateTime)
Returns True if the specified date falls within the next month.
IsNextMonth([OrderDate])
IsNextYear(DateTime)
Returns True if the specified date falls within the next year.
IsNextYear([OrderDate])
IsNovember(DateTime)
Returns True if the specified date falls within November.
IsNovember([OrderDate])
IsOctober(DateTime)
Returns True if the specified date falls within October.
IsOctober([OrderDate])
IsSameDay(DateTime)
Returns True if the specified date/time values fall within the same day.
IsSameDay([OrderDate])
IsSeptember(DateTime)
Returns True if the specified date falls within September.
IsSeptember([OrderDate])
IsThisMonth(DateTime)
Returns True if the specified date falls within the current month.
IsThisMonth([OrderDate])
IsThisWeek(DateTime)
Returns True if the specified date falls within the current week.
IsThisWeek([OrderDate])
IsYearToDate(DateTime)
Returns True if the specified date falls within the year-to-date period. This period starts from the first day of the current year and continues to the current date (including the current date).
IsYearToDate([OrderDate])
IsThisYear(DateTime)
Returns True if the specified date falls within the current year.
IsThisYear([OrderDate])
LocalDateTimeDayAfterTomorrow()
Returns a date-time value corresponding to the day after Tomorrow.
AddDays(LocalDateTimeDayAfterTomorrow(), 5)
LocalDateTimeLastMonth()
Returns the DateTime value corresponding to the first day of the previous month.
AddMonths(LocalDateTimeLastMonth(), 5)
LocalDateTimeLastWeek()
Returns a date-time value corresponding to the first day of the previous week.
AddDays(LocalDateTimeLastWeek(), 5)
LocalDateTimeLastYear()
Returns the DateTime value corresponding to the first day of the previous year.
AddYears(LocalDateTimeLastYear(), 5)
LocalDateTimeNextMonth()
Returns a date-time value corresponding to the first day of the next month.
AddMonths(LocalDateTimeNextMonth(), 5)
LocalDateTimeNextWeek()
Returns a date-time value corresponding to the first day of the following week.
AddDays(LocalDateTimeNextWeek(), 5)
LocalDateTimeNextYear()
Returns a date-time value corresponding to the first day of the following year.
AddYears(LocalDateTimeNextYear(), 5)
LocalDateTimeNow()
Returns a date-time value corresponding to the current moment in time.
AddDays(LocalDateTimeNow(), 5)
LocalDateTimeThisMonth()
Returns a date-time value corresponding to the first day of the current month.
AddMonths(LocalDateTimeThisMonth(), 5)
LocalDateTimeThisWeek()
Returns a date-time value corresponding to the first day of the current week.
AddDays(LocalDateTimeThisWeek(), 5)
LocalDateTimeThisYear()
Returns a date-time value corresponding to the first day of the current year.
AddYears(LocalDateTimeThisYear(), 5)
LocalDateTimeToday()
Returns a date-time value corresponding to Today.
AddDays(LocalDateTimeToday(), 5)
LocalDateTimeTomorrow()
Returns a date-time value corresponding to Tomorrow.
AddDays(LocalDateTimeTomorrow(), 5)
LocalDateTimeTwoMonthsAway()
Returns the DateTime value corresponding to the first day of the following month.
AddMonths(LocalDateTimeTwoMonthAway(), 5)
LocalDateTimeTwoWeeksAway()
Returns the DateTime value corresponding to the first day of the following week.
AddDays(LocalDateTimeTwoWeeksAway(), 5)
LocalDateTimeTwoYearsAway()
Returns the DateTime value corresponding to the first day of the following year.
AddYears(LocalDateTimeTwoYearsAway(), 5)
LocalDateTimeYearBeforeToday()
Returns the DateTime value corresponding to the day one year ago.
AddYears(LocalDateTimeYearBeforeToday(), 5)
LocalDateTimeYesterday()
Returns a date-time value corresponding to Yesterday.
AddDays(LocalDateTimeYesterday(), 5)
MakeDateTime(Year, Month, Day)
Returns a date value constructed from the specified Year, Month and Day.
MakeDateTime(2018, 5, 5)
MakeDateTime(Year, Month, Day, Hour)
Returns a date value constructed from the specified Year, Month, Day and Hour.
MakeDateTime(2018, 5, 5, 20)
MakeDateTime(Year, Month, Day, Hour, Minute)
Returns a date value constructed from the specified Year, Month, Day, Hour and Minute.
MakeDateTime(2018, 5, 5, 20, 18)
MakeDateTime(Year, Month, Day, Hour, Minute, Second)
Returns a date value constructed from the specified Year, Month, Day, Hour, Minute and Second.
MakeDateTime(2018, 5, 5, 20, 18, 30)
Now()
Returns the current system date and time.
AddDays(Now(), 5)
ToDateTime(Value)
Converts Value to a DateTime value.
ToDateTime([Orders])
Today()
Returns the current date. Regardless of the actual time, this function returns midnight of the current date.
AddMonths(Today(), 1)
UtcNow()
Returns the current system date and time, expressed as Coordinated Universal Time (UTC).
AddDays(UtcNow(), 7)
Custom date and time format strings
DateTimeToString(date, format, culture). Convert a given DateTime to a specified String format.
Format
Description
d
Day of the month from 1 to 31.
dd
Day of the month from 1.
ddd
Abbreviated number of the day of the week.
dddd
Full name of the day of the week.
f
Tenth of a second.
ff
Hundredth of a second.
fff
Milliseconds.
ffff
Ten thousandths of a second.
fffff
One hundred thousandths of a second.
h
Hour, in 12-hour format from 1 to 12.
hh
Hour, in 12-hour format from 01 to 12.
H
Hour, 24-hours format to 0 to 23.
HH
Hour, 24-hour format from 00 to 23.
m
Minute, defined between 0 and 59.
mm
Minute, defined as 00 to 59.
M
Month, from 1 to 12.
MM
Month, from 01 to 12.
MMM
Short name of the month.
MMMM
Full name of month.
s
Second, from 0 to 59.
ss
Second, from 00 to 59.
y
Year, from 0 to 99.
yy
Year, from 00 to 99.
yyy
Year with at least three digits.
yyyy
Year, as a four-digit number.
yyyyy
Year, as a five-digit number
Examples of different formats with the 'en-US' culture
Logical functions
Function
Description
Example
Iif(FirstClause, FirstClauseTrueValue, ..., LastClause, LastClauseTrueValue, FalseValue)
Returns either a value defined for the first Boolean condition that is True, or the last value if none of these conditions is True.
iif([InStock]=True,'Available', 'Not Available')
IsNull(Value)
Returns True if the specified Value is NULL.
IsNull([OrderDate])
IsNull(Value1, Value2)
Returns Value2 if Value 1 is null, otherwise, Value1 is returned.
IsNull([ShipDate], [RequiredDate])
IsNullOrEmpty(String)
Returns True if the specified String object is NULL or an empty string; otherwise, False is returned.
IsNullOrEmpty([ProductName])
ToBoolean(Value)
Converts Value to an equivalent Boolean value.
ToBoolean([Value])
Math functions
Function
Description
Example
Abs(Value)
Returns the absolute, positive value of the given numeric expression.
Abs(1 - [Discount])
Acos(Value)
Returns the arccosine of a number (the angle, in radians, whose cosine is the given float expression).
Acos([Value])
Asin(Value)
Returns the arcsine of a number (the angle, in radians, whose sine is the given float expression).
Asin([Value])
Atn(Value)
Returns the arctangent of a number (the angle, in radians, whose tangent is the given float expression).
Atn([Value])
Atn2(Value1, Value2)
Returns the angle whose tangent is the quotient of two specified numbers, in radians.
Atn2([Value1], [Value2])
BigMul(Value1, Value2)
Returns an Int64 containing the full product of two specified 32-bit numbers.
BigMul([Amount], [Quantity])
Ceiling(Value)
Returns the smallest integer that is greater than or equal to the numeric expression.
Ceiling([Value])
Cos(Value)
Returns the cosine of the angle defined in radians.
Cos([Value])
Cosh(Value)
Returns the hyperbolic cosine of the angle defined in radians.
Cosh([Value])
Exp(Value)
Returns the exponential value of the given float expression.
Exp([Value])
Floor(Value)
Returns the largest integer less than or equal to the numeric expression.
Floor([Value])
Log(Value)
Returns the natural logarithm of a specified number.
Log([Value])
Log(Value, Base)
Returns the logarithm of a specified number Value in a specified Base.
Log([Value], 2)
Log10(Value)
Returns the base 10 logarithm of a specified number Value.
Log10([Value])
Max(Value1, Value2)
Returns the maximum value from the specified values.
Max([Value1], [Value2])
Min(Value1, Value2)
Returns the minimum value from the specified values.
Min([Value1], [Value2])
Power()
Returns a specified number raised to a specified power.
Power()
Rnd()
Returns a random number that is less than 1, but greater than or equal to zero.
Rnd()*100
Round(Value)
Rounds the given Value to the nearest integer.
Round([Value])
Round(Value, Precision)
Rounds the given Value to the nearest integer, or to a specified Precision.
Round([Value], 2)
Sign(Value)
Returns the positive (+1), zero (0), or negative (-1) sign of the given Value.
Sign([Value])
Sin(Value)
Returns the sine of the angle defined in radians.
Sin([Value])
Sinh(Value)
Returns the hyperbolic sine of the angle defined in radians.
Sinh([Value])
Sqr(Value)
Returns the square root of a given number Value.
Sqr([Value])
Tan(Value)
Returns the tangent of the angle defined in radians.
Tan([Value])
Tanh(Value)
Returns the hyperbolic tangent of the angle defined in radians.
Tanh([Value])
ToDecimal(Value)
Converts Value to an equivalent decimal number.
ToDecimal([Value])
ToDouble(Value)
Converts Value to an equivalent 64-bit double-precision floating-point number.
ToDouble([Value])
ToFloat(Value)
Converts Value to an equivalent 32-bit single-precision floating-point number.
ToFloat([Value])
ToInt(Value)
Converts Value to an equivalent 32-bit signed integer.
ToInt([Value])
ToLong(Value)
Converts Value to an equivalent 64-bit signed integer.
ToLong([Value])
String functions
Function
Description
Example
Ascii(String)
Returns the ASCII code value of the leftmost character in a character expression.
Ascii(‘a’)
Char(Number)
Converts an integerASCIICode to a character.
Char(65) + Char(51)
CharIndex(String1, String2)
Returns the starting position of String1 within String2, beginning from the zero character position to the end of a string.
CharIndex(‘e’, ‘devexpress’)
CharIndex(String1, String2, StartLocation)
Returns the starting position of String1 within String2, beginning from the StartLocation character position to the end of a string.
CharIndex(‘e’, ‘devexpress’, 2)
Concat(String1, … , StringN)
Returns a string value containing the concatenation of the current string with any additional strings.
Concat(‘A’, ‘)’, [ProductName])
EndsWith(String1, SubString1)
Returns True if the end of String1 matches SubString1; otherwise, False is returned.
EndsWith([Description], ‘The end.’)
Insert(String1, StartPosition, String2)
Inserts String2 into String1 at the position specified by StartPositon
Insert([Name], 0, ‘ABC-‘)
Len(Value)
Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.
Len([Description])
Lower(String)
Returns String in lowercase.
Lower([ProductName])
PadLeft(String, Length)
Left-aligns the defined string’s characters, padding its left side with white space characters up to a specified total length.
PadLeft([Name], 30)
PadLeft(String, Length, Char)
Left-aligns the defined string’s characters, padding its left side with the specified Char up to a specified total length.
PadLeft([Name], 30, ‘<’)
PadRight(String, Length)
Right-aligns the defined string’s characters, padding its left side with empty space characters up to a specified total length.
PadRight([Name], 30)
PadRight(String, Length, Char)
Right-aligns the defined string’s characters, padding its left side with the specified Char up to a specified total length.
PadRight([Name], 30, ‘>’)
Remove(String, StartPosition)
Deletes all the characters from this instance, beginning at a specified position.
Remove([Name], 3)
Remove(String, StartPosition, Length)
Deletes a specified number of characters from this instance, beginning at a specified position.
Remove([Name], 0, 3)
Replace(String, SubString2, String3)
Returns a copy of String1, in which SubString2 has been replaced with String3.
Replace([Name], ‘The ‘, ‘’)
Reverse(String)
Reverses the order of elements within String.
Reverse([Name])
StartsWith(String1, SubString1)
Returns True if the beginning of String1 matches SubString1; otherwise, False.
StartsWith([Title], ‘The best’)
Substring(String, StartPosition, Length)
Retrieves a substring from String. The substring starts at StartPosition and has a specified Length.
Substring([Description], 2, 3)
Substring(String, StartPosition)
Retrieves a substring from String. The substring starts at StartPosition.
Substring([Description], 2)
ToStr(Value)
Returns a string representation of an object.
ToStr([ID])
Trim(String)
Removes all leading and trailing SPACE characters from String.
Trim([ProductName])
Upper(String)
Returns String in uppercase.
Upper([ProductName])
Specifical Biwee functions
Function
Description
Example
CheckCurrentUserEmail(email)
Returns True if provided email is the same as the current logged in user.
GetCurrentUserEmail()
Get the currently logged in user email.
SecureResource(url)
url: location of the resource.
Provides access to a resource from the web dashboard viewer without exposing its location. Don't forget to setup the data item as a hyperlink.
SecureRessource
('www.example.net')
SecureResource(url, user, mot de passe)
url: location of the resource.
user: (optional) the user that to use if accessing the resource requires an authentication.
password: (optional) the password to use if accessing the resource requires an authentication.
Provides access to a resource from the web dashboard viewer without exposing its location.
Don't forget to setup the data item as a hyperlink.
SecureRessource ('www.example.net', 'user','password')
GetImageFromUri(uri, maxWidth, maxHeight, forceResize)
Gets an image from an Uri. An Uri can point at a web ressource (http://...) or a local file (c:...). Beware that local files will not be accessible from biwee web.
The maxWidth and maxHeight parameters allow you to limit the size of the image result. The forceResize parameter will enlarge pictures that dimensions are lower thant the max size.
Dernière mise à jour
Cet article vous a-t-il été utile ?