Custom Formula

Previous  Home  Next

Below screenshot shows how to access Custom Dynamic Formula editor in Mapper. You can use Dynamic Formula to transform the data and apply business rule on-the-fly.

 

CF

Let us understand the pre-defined variables and return types that can be used in Custom Dynamic Formula on field with VB.Net code.

Variables

Description

iValue

Current value pertaining to mapping

iSheet

Current excel sheet

iCurrentExcelRowNumber

Current absolute excel row number

iMap Type

Mapping Type

iMap Value

Mapping Value

IsTestRun

Checks whether current run Is Test Run. This is for Transaction Only.

iLoopExcelHeaderRow

Looping header row. This is for Transaction Only.

iLoopExcelEndRow

Looping end row. This is for Transaction Only.

ScreenName

Screen name

ScreenNo

Screen No

ReturnScreenName

Returns screen name. This is for Transaction Only.

ReturnScreenNo

Returns screen number. This is for Transaction Only.

ReturnFieldName

Returns field name (without table name).This is for Transaction Only.

ReturnTableName

Returns  table name (without field name). This is for Transaction Only.

IsFirstCall

Executes Custom Dynamic Formula only once (first time). This is for Transaction Only.

 

For example, consider a Custom Formula that uses 'IsFirstCall' and 'ReturnFieldName' variables for 'Gross Weight' field of MM02- Change Material process file.

 
IsFirstCall = True 
ReturnFieldName = iSheet.Cells(1, "B").Text 

 

FieldName_CF

 

In this example when MM02- Change Material process file is executed, Custom Formula is executed only once and  'BRGEW' field name will be returned from Excel Cell. Hence for the file to run successfully, user will  require to change the column name in iBook/External data sheet with field name (BRGEW) as shown in below screen shot else error will be displayed if any other value is returned. In below screen shot error is encountered if 'Field Description' is used instead of Field Name.

 

returnfieldname

 

 

Next:

Data Governance Overview