Functions Glossary

Functions Glossary

 

This chapter describes the rules syntax and the built-in functions available in Centerprise Data Integrator. The chapter includes:

·         Rules Syntax – describes the Rules Syntax in the application. For more information, click Rules Syntax.

·         Functions Reference – provides information about the functions available in the application. It also explains how to use these functions with the help of practical examples. For more information, click Functions Reference.

Rules Syntax

Rules Syntax

The syntax of the Centerprise Data Integrator rules language supports a wide variety of operators and has a large library of built-in functions. You can nest expressions and access the value of data elements throughout the application. You can also access the value of user input in the current data element. The rules in Centerprise Data Integrator support the following data types:

Data types and data type syntax

All operands have one of five data types. Centerprise rules and expressions return values that are one of these five types, as described below:

Integer

An integer is a whole number without a fraction. The number 4 is an integer, while 4.5 is not.

Internally, an integer is represented as a 32-bit signed quantity. Allowed values range from 2+31 to 2-31.

Real

The rules engine uses a double precision floating point internally for real numbers with decimals. You must specify constants in digits with a decimal point.

Date

You must specify date constants in the [mm/dd/yyyy] format and enclose them in square brackets. Date is represented internally by a long integer. Accepted dates range from 01/01/1900 to 12/31/9999.

String

Strings represent a set of any arbitrary characters. You must surround string constants by double quotes, for example: ”r;string”.

Boolean

Boolean is an expression that evaluates to TRUE or FALSE. You can use Boolean data types as operands in rules only by creating an expression that returns a Boolean value.

Functions Reference

Functions Reference

A function is a statement that is executed when it is called from a point in the application. Its format is as follows:

Type name(param1, param2, ...) where:

·         Type is the data type of the data returned by the function.

·         Name is the identifier that is used to call the function.

Parameter(s) consist(s) of a data type followed by an identifier, for example - double number. Here double is the data type and number is the argument for the function. A comma separates each parameter.

The functions available in Centerprise can be grouped into seven categories. They are:

·         Logical

·         Date Time

·         Conversion

·         Math

·         String

·         General

·         Financial

Logical

Logical

Logical functions test a given condition and return TRUE or FALSE, based on the assessment of the condition. The logical functions are discussed below:

 If(Boolean condition, String thenValue, String elseValue)

Returns the value of the thenValue expression depending on if the condition evaluates to true or not.  If true, it returns thenValue.  Otherwise, it returns elseValue.

Parameters:

condition: An expression that evaluates to a Boolean value.  Can be a single Boolean field or a complex expression.

thenValue; The text value to be returned if the condition evaluates to true.

elseValue: The text value to be returned if the condition evaluates to false.

 

 

Date Time

Date Time functions provide a way to format and display the date and time. The Date Time functions are discussed below.

Conversion

Conversion functions are used to convert a value from one data type to another. The Conversion functions are discussed below.

Math

Math

Math functions help with mathematical calculations. The Math functions are discussed below.

Max(DateTime,DateTime)

Returns the greater of the two given DateTime instances.

Code

DateTime Max(DateTime first, DateTime second)

Parameters

DateTime first: Represents an instant in time, typically expressed as a date and time of day.

DateTime second: Represents an instant in time, typically expressed as a date and time of day.

Example

Code

Returns the value

Max(08/07/1996 11:29:13AM, 12/07/2006 04:29:13AM)

12/07/2006  

        04:29:13AM

Max(Double,Double)

Returns the greater of the two real numbers.

Code

Double Max(Double first, Double second)

Parameters

Double first: A value represented by a double precision floating point, or a real number with decimals.

Double second: A value represented by a double precision floating point, or a real number with decimals.

Example

Code

Returns the value

Max(3.45,6.75)

6.75

Max(Int64,Int64)

Returns the greater of the two integer numbers.

Code

Int64 Max(Int64 first, Int64 second)

Parameters

Int64 first: A value of integer data type.

Int64 second: A value of integer data type.

Example

Code

Returns the value

Max(-3,-5)

-3

Max(6,-16)

6

String

String functions help to manipulate a given data string enabling you to alter the way it is displayed. The String functions are discussed below.

General

General functions are those functions that are provided for general programming use. Centerprise Data Integrator provides a function called IsValidName(String), which is categorized as general. This function is discussed below.

Financial

Financial functions are used to evaluate financial information. The resultant values help you in making crucial finance-related business decisions. The Financial functions are discussed below.

 

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.