Data Transformation Engine Functions and Expressions Reference Guide
Chapter 3 - Function Reference CLONE
Functions and Expressions Reference Guide
73
CLONE
The CLONE function creates a specified number of copies of some object.
Syntax
CLONE (single-object-name , single-integer-expression )
Meaning
CLONE (object_to_copy , number_of_copies)
Returns
This function returns a series-object.
The
CLONE function returns a series of the object specified by object_to_copy.
The output series consists of as many copies of the object as specified by
number_of_copies. The value of each member of the resulting output series is
the same as object_to_copy.
Examples
For this example, your input contains an object named Detail Row that has a
Quantity item component. You want to create multiple Line Item Segments
for every Detail Row in your input, based on the value of Quantity. So, if
Quantity has the value 5, you want to build 5 Line Item Segments for that
Detail Row. Use the
CLONE function, as in:
LineItem Segment (s) = LotsOf ( CLONE ( Detail Row ,
Quantity:Detail Row ) )
Uses
The
CLONE function is useful when the number of output objects to be built
depends on a data value, rather than the number of objects that exist in the
data.