Create a map that uses an existing external map variable and defines new ones to be
used in your Route.
Procedure
In your Route, double-click the cMap component.
In the first step of the wizard that opens, select your input structure and
click Next.
In the second step, select your output structure and click
Finish.
A map is generated and opens in the editor. You can now configure
it.
Drag the input orders element on the output
orders element.
All elements in the input are automatically mapped with the
corresponding elements in the output.
From the Functions tab, place a
Multiply function on the itemTotal
element.
Place the output price element on the First
Value argument and the output quantity element
on Second Value.
Place an AgSum function on the
orderTotal element, then place the
itemTotal element on the AgSum
function.
Place a GetValueFromExternalMap function on the
orderDate element, place a Constant
function on the Key argument, then double-click the
Constant function and enter
current.date in the Value
field.
This configuration allows you to retrieve the value from the variable you
created in the first cProcessor component of your Route.
Place an AddToDateTime function on the
shippingDueDate element, double-click the function and
select Days in the Add what?
drop-down list.
Place a Constant function on the
Amount argument and set its value to
5.
Place the output orderDate element on the DateTime
Value argument.
Open the Util tab of the
shippingDueDate element and place a
PutValueToExternalMap function in it.
Place a Constant function on the
Key argument and set its value to
due.date.
Place the shippingDueDate element on the
Value argument.
This allows you to create an external map variable named
due.date with the value of the
shippingDueDate element.
Click the output orderId element, open its
Util tab and repeat the previous steps to create a
variable named order.id.
Save your map.
Results
Your map is now configured. You can run your Route to see the result. In this
example, the result looks like this:
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!