Transform Data Using Functions in Publication Maps

You can use transformation functions in publication maps to transform the data before publishing it to a target spoke system.

You can apply the transformation functions for TEXT output file types.

To transform data using functions in publication maps:

  1. On the Publication Map page, select a mapping and click Transform.

    The Transform master attributes drawer is displayed, where you can add and validate transformation expressions using functions and attributes.

  2. On the Functions and Attributes tabs, drag and drop the required functions and attributes into the Add expression field.

    You can click each function and view the syntax and the description in the Function Description section. For details, see Functions for Transform Expressions.

    You can search for attributes on the Attributes tab.

  3. After adding the expression, click Validate to validate the expression. When the expression is successfully validated, the Expression validated message appears with the green tick mark beneath the Add expression field.
  4. Click Transform. The validated expression is displayed in the Expression column for the corresponding mapping on the Publication Maps page.
    Note: You can only transform one spoke to master attribute mapping at a time.

Functions for Transform Expressions

The functions used to create transform expressions can be of type Generic, Math, or String.

Generic Functions

The generic functions available for creating expressions are listed in the following table.

Name

Description

Expression

Example

nvl

Returns the value of expression2 if the value of expression1 is blank, otherwise returns the value of expression1.

nvl(expression1,expression2)

nvl([Attribute1],concat([Attribute2],[Attribute3])) results in ItemDescription where Attribute1 = Null, Attribute2 = Item, and Attribute3 = Description

getCustomObjectValue

Returns the value of custom object attribute corresponding to the specified custom object attribute and expression.

getCustomObjectValue(customObjectApiName,customObjectReturnAttributeApiName,customObjectQueryAttributeApiName1,expression1,...customObjectQueryAttributeApiNameN,expressionN)

getCustomObjectValue("CustomObject","CustomObjectAttribute1","CustomObjectAttribute2",[CSV Column1]) = Media Inc.
where:
  • CustomObject = Manufacturer Details
  • CustomObjectAttribute1 = Media Inc.
  • CustomObjectAttribute2 = MI
  • CSV Column1 = MI

decode

Returns the value of expression3 if the value of expression1 equals value of expression2, otherwise returns the value of expression4.

decode(expression1,expression2,expression3,expressiosn4)

decode([Attribute1],[Attribute2],[Attribute3],[Attribute4]) results in Match
where:
  • Attribute1 = Item
  • Attribute2 = Item
  • Attribute3 = Match
  • Attribute4 = No Match

toString

Converts an object to its string representation.

toString(expression)

If Attribute1 = 4, then toString([Attribute1]) = 4

String Functions

The string functions available for creating expressions are listed in the following table.

Name

Description

Expression

Example

concat

Concatenates the specified character strings.

concat(expression1, expression2,.....expression30)

If Attribute1 = Item and Attribute2 = Description, then concat([Attribute1],[Attribute2]) = ItemDescription

length

Returns the length, in number of characters, of a specified string. The length excludes blank characters.

length(expression)

If Attribute1 = Item, thenlength([Attribute1]) = 4

split

Splits character string at the specified delimiter and returns the specified part of the string. Delimiter can be any regular expression or special character.

split(expression, delimiter, partNumber)

If Attribute1 = Item#Description, then split([Attribute1],#,2) = Description

substring

Creates a new string of specified length, starting from the specified character number in the original string.

substring(expression, startPosition, length)

If Attribute1 = ItemDescription, then substring([Attribute1],0,4) = Item

insert

Inserts a specified character string into the specified location in another character string.

insert(expression1, integer1, expression2)

If Attribute1 = ItemDescription and Attribute2 = Long, then insert([Attribute1],5,[Attribute2]) = ItemLongDescription

uppercase

Converts a character string to uppercase.

uppercase(expression)

If Attribute1 = item, then uppercase([Attribute1]) = ITEM

lowercase

Converts a character string to lowercase.

lowercase(expression)

If Attribute1 = ITEM, then lowercase([Attribute1]) = item

Math Functions

The math functions available for creating expressions are listed in the following table.

Name

Description

Expression

Example

round

Rounds a numeric expression to n digits of precision.

round(expression, integer)

If Attribute1 = 10.45

round([Attribute1],0) = 10