Load the Most Future Dated Record

XML Forms Guide

Version
R2024.1.1
Load the Most Future Dated Record

Forms can be configured to automatically populate the most future dated record for a field, so that if the employee has one or more pending changes in the future, the change that takes effect furthest in the future is returned.

Copy
<UsedClass>
    <Name>List_EmployeeEmploymentStatus</Name>
    <Mode>Latest</Mode>
    <AddNewInstanceIfEmpty>True</AddNewInstanceIfEmpty>
    <DefaultStatus>Insert</DefaultStatus>
</UsedClass>

In the preceding example, the 'Latest' loading mode is used to configure the form to populate the most future-dated record from the fields taken from the 'List_EmployeeEmploymentStatus' table.

To continue the example, the next pay period on the form is calculated based on the loaded future dated record, rather than the current record, by referencing the 'List_EmployeeEmploymentStatus.NextPayDate' field:

Copy
<Field>
    <Style>IVDatePicker</Style>
    <Block>1</Block>
    <Row>10</Row>
    <Column>1</Column>
    <BindingProperty>List_EmployeeEmploymentStatus.NextPayDate
        </BindingProperty>
    <IsReadOnly>True</IsReadOnly>
</Field>