Mapping
Mapping is defined in the logic block of the XML definition and is a flexible, structured approach to processing the exported data. These options are mapping properties and features of the standard Payroll Export Interface:
- There is no limit on the number of mapping rules to be applied.
- The standard Payroll Export process sorts through each mapping rule in chronological order. When a match is found, the process stops sorting through the remaining mapping rules.
- Several values in one field can be matched for output (for example, tcode_name that equals WRK, VAC, or SICK can be selected for output).
- Matching wild cards are specified by the '%' character.
- Output can be suppressed for a particular match (for example, data for a salaried employee does not need to be in the output file).
- One record can be split into several output records. This is useful to map one input field to many output fields.
- Data grouping is available.
- Operations such as percentage, division, and multiplication can be performed to the mapped data in the format block.
For example, a logic block:
<logic>
  <match_output>
    <match field="tcode_name" />
      <value>VAC</value>
      <value>SICK</value>
      <value>W%</value>
    </match>
    <output_row>
      <map field="earn_code" value="001">
    </output_row>
  </match_output>
  <match_output>
    <match field="htype_name" value="OT%" />
    <output_row>
      <map field="earn_code" value="002"/>
    </output_row >
  </match_output>
  <match_output>
    <match field="tcode_name" value="WRK" />
    <match field="htype_name" value="UNPAID" />
  </match_output>
  <match_output>
    <output_row>
      <map field="earn_code" value="999"/>
    </output_row >
  </match_output>
</logic>For this example:
- The first <match_output>block maps all records with tcode_name as VAC, SICK, or W% to an earning code of 001.
- In the next <match_output>block, any overtime is mapped to earning code of 002.
- In the next <match_output>block, tcode_name with value of WRK and htype_name with value of UNPAID are not mapped because there is no<output_row>block.
- Finally, the last block catches all records that do not match the previous match criteria and outputs their earning code as 999 (notice that there is no <match>block).