It is a common pattern to work twice on a output card, e.g.:
- when the output should also include summarized amounts of several output records that need to be built/calculated first
- when the header should announce how many records will follow
Now when building the mapping for the 2nd iteration of the output card, the automapper comes in handy, because we usually map the results of the first iteration 1:1, except for one or two fields that need the SUM() or COUNT() values. Unfortunately the automapper doesn't work here, since its behavior somehow differs when input and output use the same typetree (please see the linked PMR for details).