Out of the Box Functions

Prev Next

eCASE provides the following canned functions for use in creating expressions.

Function Name

Description

AddDays(targetDateTime, days)

Add days to target date and return the result.

AddHours(targetDateTime, hours)

Add hours to target date and return the result.

AddMonths(targetDateTime, months)

Add months to target date and return the result.

AddYears(targetDateTime, years)

Add years to target date and return the result.

Ceil(decimal)

Rounds a number up to nearest integer.

ChoiceId(choicelistInternalName, choiceValue)

Get choice list value id by its choice list internal name and choice list value.

ChoiceValue(choicelistInternalName, choiceValueId )

Get choice list value by its internal name and choice id.

Date(YYYY, MM, DD)

Create a Date to specified year, month and day.

DateDiffDays(date1, date2)

Return the difference between input dates.

DateIIF(statement, date1, date2)

Return date1 if statement is true and date2 otherwise.

DateTime(YYYY, MM, DD, hh, mm, ss)

Create a Date to specified year, month, day, hour, minute and second.

DateTimeToString(datetime, format)

Returns a datetime in string format.

DecimalRound(decimal, digitsAfterDecimal)

Rounds a decimal to specific nearest decimal.

DecimalToString(decimal)

Convert current decimal to its string representation.

Fill(string, repeatTime)

Return a new string indicated by a specified string repeated a specified number of times.

Floor(decimal)

Rounds a number down to nearest integer.

GuidToString(Guid)

Convert Guid to string.

IndexOf(string, string)

Gets the index of the second string found in the first string.

IntToFormattedString(integer, format)

Convert current integer to its string representation, using the specified format.

IntToString(integer)

Convert current integer to its string representation.

ItemCount(list)

Get count of items in a given list.

Length(string)

Gets the number of characters in the current string.

Lower(string)

Returns a copy of string converted to lowercase.

Matches(string, pattern)

Search the string for first occurrence of specified regular expression.

NewGuid()

Returns a new global Unique ID.

Not(expression)

Returns true if a boolean value of the expression is false or null. Returns false if the boolean value is true or not null.

Now()

Gets DateTime object that is set to the current date and time on this computer, expressed as the local time.

Replace (findString, replaceString, targetString)

Returns a new string in which all occurrences of a specified character in this instance are replaced with another specified character.

Round(decimal)

Rounds a number to the nearest integer.

StringContains(string, substring)

Checks if a string contains specified substring and returns true/false.

StringIIF (statement, option1, option2)

Return option1 if statement is true and option2 otherwise.

Substring (string, startIndex, length)

Return a substring from current string, which starts at a specified character position and has a specified length. Zero index.

SubstringAfter(target, searchString)

The function searches for the searchString in the target, and will return the portion of the target that follows the first occurrence of searchString in the target.

Ex: SubstringAfter(“firstANDsecondANDthird”, “AND”) will return “secondANDthird”

SubstringBefore(target, searchString)

The function searches for the searchString in the target, and will return the portion of the target that precedes the first occurrence of searchString in the target.

Ex: SubstringBefore(“firstANDsecondANDthird”, “AND”) will return “first”

ToBool(string)

Convert string to its bool representation.

ToDate(string, format)

Converts string to Date of specified format.

Today()

Gets current date when the form is in use.

ToDecimal(string)

Convert the value of current string to a decimal.

ToInt(string)

Convert the value of current string to an integer.

Translate(target, searchCharacters, replaceCharacters)

Returns the target with each character in searchCharacters replaced by the character at the same position in the replaceCharacters in the target”

Ex) Translate(“Hello”, “eo”, “is”) will return “Hills

Trim(string)

Removes all leading and trailing space from the current string.

TrimStart(string, trimChar)

Removes all leading space or a sequence of characters from the current string.

Trunc(decimal)

Returns decimal truncated to integer.

Upper(string)

Returns a copy of string converted to uppercase.