Map Collection Fields#
Projects supplied entities or records into fresh scalar-valued records without changing source objects.
Inputs#
Set Collection, Mappings in the task details. Use the value editor to select compatible results from earlier tasks.
Mappings accepts a collection of Cmf.Foundation.BusinessObjects.Tasks.MapCollectionTask.FieldMapping objects. Enter a C# expression enclosed in {{ ... }} directly in this input, or reference an earlier output containing that type.
| Property | Description |
|---|---|
Name | Required output field name. Names must be unique, ignoring case. |
Source | Dot-separated field path relative to the current item. Leave it unset to use Value. |
Value | Scalar constant or earlier result to use when Source is unset. |
ValueType | Logical scalar type, such as String or Decimal. The default, Object, preserves the scalar's type. |
DefaultValue | Fallback for a missing source path. A present null value remains null. |
Table 1: Field mapping properties
Outputs#
Use Rows, RowCount in subsequent tasks.
Project Material Names and Quantities
Use a preceding Load or Refresh Entities task named load to load the Materials to project.
- Add Map Collection Fields after
loadand name itmap. - Set
Collectionto{{$load.Result}}. -
Enter the following expression in
Mappings: -
Use
{{$map.Rows}}in a subsequent task, such as Compose JSON. Each record containsLotNameandQuantity; the original Materials remain unchanged.
Behavior#
Connect a compatible collection of field mappings to Mappings. The task creates new records and leaves the source collection unchanged. A field mapping identifies its output name, source field or constant value, and value type.
