Data Mapping, Transformation, and Functions
Mapping and Functions
Data mapping links output from one module to input fields of another. Fusion provides a mapping panel with available fields. Functions (e.g., formatDate, substring, round, if, switch) transform data. Functions are accessed via the mapping panel's function tab. Arrays and collections require special handling: use map() to extract values, join() to concatenate, and iterators to process arrays. Variables can store temporary data.
Common Functions
- Text:
length,lower,upper,replace,split. - Math:
round,floor,ceil,sum,average. - Date/Time:
formatDate,parseDate,addDays. - Logical:
if,and,or,not. - Array:
map,join,distinct,sort.
Traps in Questions
- Type mismatches: Functions expect specific types (e.g.,
roundneeds a number); mapping a string causes errors. - Null handling: Functions may fail on null; use
ifemptyor default values. - Date formats: Fusion uses ISO 8601 by default; specify format strings correctly.
- Array indexing: Arrays are 1-indexed in some functions; check documentation.
Worked Example / Rule of Thumb
Rule of thumb: "Transform early, map cleanly." For example, to format a Workfront due date (ISO) to MM/DD/YYYY, use formatDate(plannedCompletionDate; MM/DD/YYYY). To combine first and last names, use concat(firstName; space; lastName).