Define Expression-Based Fields

XML Forms Guide

Version
R2024.1.1
Define Expression-Based Fields

Before You Begin: These expressions must be defined using configurable parameters, and not calculated parameters. Configurable parameters must be configured with an employee-level access, such as Employee, or Pay Group or Employee Override, or Payee or Employee Override. Access is assigned when you create the expression in the Parameters sub-tab in Payroll Setup > Earnings and Deductions.

For generated earnings or deductions, you can add fields that use expressions in the payroll election request forms. These expressions must be defined using configurable parameters. When creating these forms, you need to follow these conditions:

  • Each form cannot include both expression and amount/percent data sources.
  • Each form should only focus on either generated earnings or deductions and not both at the same time.
  • An individual reference name should only be used once in a form, but a form can use many unique reference names.
  • Any reference names used in the expressions must be applicable to all generated earning or deduction definitions in the form.
  • If the form uses multiple expression parameters, parameters can be coded in separate value field definition blocks.

The following is a code example of an earning parameter in a payroll election request form. The earning parameter in the example uses an expression defined by configurable parameters. You should update the row and column style tags to match your desired form style.

Copy
<Label>
    <Style>IVLabel</Style>
    <!-- update Caption contents to match the Short Name defined for the Expression Configurable Parameter with employee level access -->
    <Caption>Exp Param 1 (P1) </Caption>
    <MarkAsRequired>True</MarkAsRequired>
    <Row>7</Row>
    <Column>0</Column>
</Label>
<Field>
    <Style>IVTextBox</Style>
    <Row>9</Row>
    <Column>0</Column>
    <!—Increment XrefCode by 1 if you are adding additional expression parameters. Maximum = 20 -->
    <BindingProperty>List_EmployeeEarning.XrefCode1</BindingProperty>
    <IsRequired>True</IsRequired>
    <Visible>False</Visible>
    <!-- update InitialValue contents to match the Reference Name defined for the Expression Configurable Parameter with employee level access -->
    <InitialValue>P1 </InitialValue>
</Field>
<Field>
    <Style>IVTextBox</Style>
    <Row>8</Row>
    <Column>0</Column>
    <!—Increment ExpParam by 1 if you are adding additional expression parameters. Maximum = 20 -->
    <BindingProperty>List_EmployeeEarning.ExpParam1</BindingProperty>
    <IsRequired>True</IsRequired>
    <Visible>True</Visible>
</Field>

The following is a code example of a deduction parameter in a payroll election request form. The deduction parameter in the example uses an expression defined by configurable parameters. You should update the row and column style tags to match your desired form style.

Copy
<Label>
    <Style>IVLabel</Style>
    <!-- update Caption contents to match the Short Name defined for the Expression Configurable Parameter with employee level access -->
    <Caption>Percent </Caption>
    <MarkAsRequired>True</MarkAsRequired>
    <Row>7</Row>
    <Column>0</Column>
</Label>
<Field>
    <Style>IVTextBox</Style>
    <Row>9</Row>
    <Column>0</Column>
    <!—Increment XrefCode by 1 if you are adding additional expression parameters. Maximum = 20 -->
    <BindingProperty>EmployeeDeduction.XrefCode1</BindingProperty>
    <IsRequired>False</IsRequired>
    <Visible>False</Visible>
    <!-- update InitialValue contents to match the Reference Name defined for the Expression Configurable Parameter with employee level access -->
    <InitialValue>Percent </InitialValue>
</Field>
<Field>
    <Style>IVTextBox</Style>
    <Row>8</Row>
    <Column>0</Column>
    <!—Increment ExpParam by 1 if you are adding additional expression parameters. Maximum = 20 -->
    <BindingProperty>EmployeeDeduction.ExpParam1</BindingProperty>
    <IsRequired>False</IsRequired>
    <Visible>True</Visible>
</Field>