System Functions

System functions are built-in functions provided by Data Exchange, which enable you to customize data from a source data store to a target data store based on these functions.

The following system functions are supported in Data Exchange:

IsNull

Description

Returns a boolean which indicates if the input parameter is null or not.

Syntax

IsNull (<<object>>)

Parameters

<object>- an object

Return Value

Type: Boolean

Examples

If

Description

The If statement tests a condition and returns a value if the condition evaluates to True, and NULL if it evaluates to False.

Syntax:

If(<<ifExpression>>, <<ifTrueResult>>)

Parameters

Return Value

Type: Object

Examples

IfElse

Description

The IfElse statement tests a condition and returns a value if the condition evaluates to True, and another value if the condition evaluates to False.

Syntax

IfElse(<<ifExpression>>, <<ifTrueResult>>,<<elseResult>>)

Parameters

Return Value

Type: Object

Examples

Trim

Description

Trims the blank spaces at the beginning and end of the string.

Syntax

Trim(<<string>>)

Parameters

<<string>> - string to be trimmed. It must be of character data type.

Return Value

Type: String

Examples

TrimStart

Description

Trims the leading blank spaces of the string.

Syntax

TrimStart(<<string>>)

Parameters

<<string>> - string to be trimmed. It must be of character data type.

Return Value

Type: String

Examples

TrimEnd

Description

Trims the trailing blank spaces of the string.

Syntax

TrimEnd(<<string>>)

Parameters

<<string>> - string to be trimmed. It must be of character data type.

Return Value

Type: String

Examples

Substring

Description

Retrieves a substring that starts at a specified character position and has a specified length.

Syntax

Substring(<<string>>, <<startIndex>>, <<length>>)

Parameters

Return Value

Type: String

Examples

IndexOf

Description

Returns a zero-based index on the first occurrence of the specified string, or -1 if it does not occur.

Syntax

IndexOf(<<string>>, <<searchString>>)

Parameters

Return Value

Type: Int64

Examples

PadLeft

Description

Returns a string of a specified length in which the start of the current string is padded with a specified character.

Syntax

PadLeft(<<string>>, <<totalLength>>, <<charToPad>>)

Parameters

Return Value

Type: String

Examples

PadRight

Description

Returns a string of a specified length in which the end of the current string is padded with a specified character.

Syntax

PadRight(<<string>>, <<totalLength>>, <<charToPad>>)

Parameters

Return Value

Type: String

Examples

Length

Description

Returns the length of the string represented by the specified object.

Syntax

Length(<<object>>)

Parameters

<<object>> - an object.

Return Value

Type: Int64

Examples

ConvertToInt64

Description

Converts a specified object to data of long type.

Syntax

ConvertToInt64(<<object>>)

Parameters

<<object>> - an object.

Return Value

Type: Int64

Examples

ConvertToBoolean

Description

Converts a specified object to an equivalent Boolean value.

Syntax

ConvertToBoolean(<<object>>)

Parameters

<<object>> - an object.

Return Value

Type: Boolean

Examples

ConvertToDateTime

Description

Converts a specified object to a DateTime value.

Syntax

ConvertToDateTime(<<object>>, <<formatString>>,
 <<cultureName>>)

Parameters

Return Value

Type: DateTime

Examples

ConvertToDecimal

Description

Converts a specified object to a decimal number.

Syntax

ConvertToDecimal(<<object>>)

Parameters

<<object>> - an object.

Return Value

Type: Decimal

Examples

ConvertToDouble

Description

Converts a specified object to double.

Syntax

ConvertToDouble(<<object>>)

Parameters

<<object>> - an object.

Return Value

Type: Double

Examples