Payroll Export XML tag reference

The entire export definition is contained in a single XML document, which includes data source definitions, processing/mapping directives, and the layout definition. These definitions are the XML definition tag reference set:

Main XML document tags

<payroll_export>
Definition
Defines the payroll export interface.
Attributes
plug-in: The plug-in classname of the custom Java class to implement. This custom class must extend the standard package.com.workbrain.app.export.payroll.
Note: Specify com.workbrain.app.export.payroll.basic.BasicPayrollExportPlugin unless you are using a custom plug-in.

See Example XML definition.

Inner Tags
<data> (required)
<logic> (required)
<format> (required)

Data selection tags

<data>
Definition
Contains a set of field tags.
Attributes
None
Inner Tags
<field>
<dummy_field>
<summary_field>
<field>
Definition
Defines a data field to be used in export.
Attributes
name: The field name (required).

See Payroll Export Interface references.

group_function: If the data is grouped, this attribute specifies the grouping method for the field. Valid values are sum, first, and last. Default value is first.
Inner Tags
None
<dummy_field>
Definition
Defines the dummy field to be used in export. This field is initially empty, but can be later mapped with data.
Attributes
name: The field name. Any unique name is sufficient (required).
group_function: If the data is grouped, this attribute specifies the grouping method for the field. Valid values are sum, first, and last. Default value is first.
Inner Tags
None
<summary_field>
Definition
Defines a summary field, which aggregates data from another field for each row of output.
Attributes
name: The field name. Any unique name is sufficient (required).
summary_function: Specifies the aggregate function for this field. Valid values are sum, first, last, min, max, count, average, and list.
field: Specifies the field to aggregate data from. The '*' symbol can be used if summary_function=count.
Inner Tags
None

Data processing tags

<logic>
Definition
This block contains data processing directives, such as how to modify rows that are generated by the query. All the directives are processed in the order that is defined for each query row.
Attributes
group: The type of data group to perform after logic processing. Valid values are employee_and_date_and_earn_code and employee_and_earn_code. Default is no grouping.
Inner Tags
<match_output>
<match_output>
Definition
Specifies a match condition and outputs the row if the condition is satisfied. When a match is found, no other <match_output> tags are evaluated.
Attributes
last_match: If set to true and the row satisfies all math conditions, no further processing is applied to this record after this match. Valid values are true and false. Default value is false.
Inner Tags
<match>
<output_row>
<match> 
Definition
Defines a condition for row evaluation
Attributes
field: The field name to be evaluated.
value: The value to compare to the field value during evaluation. The null keyword can be used to compare field values that could be null. Due to this keyword, you cannot use the literal string "null" during a comparison.

For example:

<match field="emp_val2" value="null" />

This XML tag resolves to TRUE if emp_val2 contains a null value.

operator: The operator to compare the field and value. Valid values are equal, not_equal, and in. Default value is equal.
Inner Tags
<value>: The <value> tag is an alternative to the value attribute. If more than one value is provided, the default operator is set to "in". The null keyword can also be used in the <value> tag.

For example: <value>null</value>

<output_row>
Definition
Defines a new output row inside the <match_output> tag. This is referred to as record splitting. The same record is outputted as many times as the number of <output_row> tags.
Attributes
None
Inner Tags
<map>: Defines a mapping through which the row is processed.
<map>
Definition
Defines a row modification.
Attributes
field: The name of the field to be modified (required).
value: Replace the field with this value.
from_field: Replace the field with the value in this field name.
percent: If the field is numeric, specify a percent operation to apply to the value in the field.
divide: If the field is numeric, specify a divide operation to apply to the value in the field.
multiple: If the field is numeric, specify a multiply operation to apply to the value in the field.
null: If the field is null after the mapping logic is applied, specify a value to be assigned to the field.
Inner Tags
<decode>: Defines a key-value decode pair for this mapping.
<decode>
Definition
Defines a key-value decode pair.
Attributes
key: The value to compare to the mapped field value (required).
value: The value to assign to the mapped field, if there is a key match (required).
Inner Tags
None

Data formatting tags

<format>
Definition
This block contains data formatting directives on how the export file is displayed.
Attributes
None
Inner Tags
<header> (optional)
<body> (required)
<footer> (optional)
<header>
Definition
Defines an export or an export group header. The directives within this tag are processed once per export or export group.
Attributes
None
Inner Tags
See Layout tags.
<body>
Definition
This block contains layout directives, which are processed once per row of data. There must be only one <body> tag in the innermost group tag or in the format if there are no groups defined.
Attributes
None
Inner Tags
See Layout tags.
<footer>
Definition
Defines an export or an export group footer. The directives in this block are processed once per export or export group.
Attributes
None
Inner Tags
See Layout tags.

Layout tags

<constant>
Definition
The body within this tag is outputted as is.
Attributes
pad_left: Specifies the length that the value is padded to the left (integer).
pad_right: Specifies the length that the value is padded to the right (integer).
pad_value: Specifies a value with which to pad the field (string).
Inner Tags
None
<new_line>
Definition
Specifies a new line to be inserted in the output.
Attributes
CR: CR='false' does not include the carriage return character. Instead, a line feed is used in the output.
Inner Tags
None
<tab>
Definition
Specifies a tab to be inserted in the output.
Attributes
None
Inner Tags
None
<string>
Definition
Defines a character-based field in the output.
Attributes
field: Specifies the name of the field (required).
pad_left: Specifies the length that the value is padded to the left (integer).
pad_right: Specifies the length that the value is padded to the right (integer).
pad_value: Specifies a value with which to pad the field (string).
Inner Tags
None
<number>
Definition
Defines a numeric-based field in the output.
Attributes
field: Specifies the name of the field (required).
pad_left: Specifies the length that the value is padded to the left (integer).
pad_right: Specifies the length that the value is padded to the right (integer).
pad_value: Specifies a value with which to pad the field (string).
format: Defines a number output format. See Formatting reference.
percent: Specifies a percent operation to apply to the number in the field.
divide: Specifies a divide operation to apply to the number in the field.
multiple: Specifies a multiply operation to apply to the number in the field.
field_multiple: Specifies a field name for the multiply result.
Inner Tags
None
<datetime>
Definition
Defines a datetime-based field in the output.
Attributes
field: Specifies the field name (required). Note that PERIOD_START_DATE and PERIOD_END_DATE refer to the pay period that was exported, while CURRENT_TIMESTAMP refers to the payroll export procedure start timestamp.
pad_left: Specifies the length that the value is padded to the left (integer).
pad_right: Specifies the length that the value is padded to the right (integer).
pad_value: Specifies a value with which to pad the field (string).
year_start: Specifies the date in MM-dd format of the year start. This attribute affects the w format attribute (week in year).
format: Defines a datetime output format. See Formatting reference.
Inner Tags
None