Using a functional map to increment data

A functional map can only map input or output data that is passed to it as an argument. Therefore, to generate consecutive line item numbers for multiple occurrences, use the INDEX function on objects as an input argument of the functional map. Each time that data object is called, the index of the current object will be sent to it.

For example, when ItemMap is called for the first time, the index of the LineItem will be 1. When ItemMap is called for the second time, the index of the LineItem will be 2. This number will then be mapped to the field Item#.