Data Transformation Engine Design Studio Tutorial
Chapter 3 - Modifying the Mail.mms Map Source File Entering Map Rules
Design Studio Tutorial
95
Another way to express the
IF function syntax would be:
IF (
condition
,
do this if the condition is met
[,
optionally
do this if the condition is not met
])
The braces that surround the third argument
[,
result_if_false
] indicate that
the comma and the third argument are optional.
Mapping the FullName Field
A description of the map rule is: “If the Middle Name Field is present, map the
First, Middle, and Last Name Fields. If the Middle Name Field is not present,
map only the First and Last Name Fields.”
The outer function in the map rule is the
IF function.
♦ The first argument of the
IF function is the PRESENT function. The PRESENT
function performs the test of a condition.
♦ The second argument of the
IF function is the text concatenation of the first,
middle and last name: what to map if the condition is true.
♦ The third argument for the
IF function is a text concatenation of the first and
last name (excluding the middle name) what to map if the condition is false.
The rule entered looks like this:
=IF (PRESENT (Middle Name Field:ContactsIn),
First Name Field:ContactsIn + " " + Middle Name Field:ContactsIn
+ " " + Last Name Field:ContactsIn,
First Name Field:ContactsIn + " " + Last Name Field:ContactsIn)
To enter the map rule for Full Name Field
1 Select the rule cell next to FullName Field.
2 From the Rules menu, choose Insert Function.
The Insert Function dialog box appears.