Example: Extract a selected element of the input array to a single output

Select an element from an input array, and copy it to a single output element in the XML map editor.

Select the third rewardPoints element of type int from the input array goldStar_Client rewardPoints and copy it to a single output element frequent_flyer_points of the same type.

To extract a selected element of the input array to a single output element, follow these steps:
  1. Map the elements using a Move transform. The following image shows how this looks in the map editor:
    Input and output business objects in the XML map editor.
  2. Select element 3 by setting the cardinality of the Input array indices for the Move transform to 3. There is no option to set the cardinality of the output element, because it is a single element. To set the cardinality, follow these steps:
    1. Click the Move transform.
    2. Right click the white space in the map editor, and select Show In > Properties View.
    3. Click the Cardinality tab.
    4. Enter 3 in the Input array indices field.
    Tip: The first index element has a cardinality of 1.
    Cardinality page
  3. Right-click the map canvas, and select Test Map to see the output of the map based on the input specified, as shown in the following image. Note that goldStar_client[0] is the first index element with a cardinality of 1, and the third index element is goldStar_client[2] with a cardinality of 3:
    Input and output xml in the test map view