Load Additional Data Sources

XML Forms Guide

Version
R2024.1.1
Load Additional Data Sources

If you are referencing a data source that isn’t associated with a form control, you must explicitly load the data class. For example, if you were referencing a data source within a validation.

You can also use the <UsedClass> tag to filter the records being loaded by a data source that is associated with a form control.

To load a data source, you use the <UsedClass> tag. The <UsedClass> tag must appear under the root tag at the same level as the <FormHeader> tag.

Tags that can be used within the <UsedClass> tag
Tag Description
<Name> Required. The name of the data class to be loaded. Possible values include List_PersonAddress, List_PersonContact
<Mode>

Required. Controls which records within the class are loaded. Possible values:

  • All: Load all records for the employee
  • Current: Load all records that are current (where today’s date falls between the effective start date and effective end date)
  • Latest: Load the most future dated record. See Load the Most Future Dated Record.
  • None: Do not load any data for the employee.
  • Primary: Load the record marked as Primary.
  • AllKeyValues: Load all records where the key (XRefCode) matches the values defined by the <LoadCriteria> tag (below)
  • AnyKeyValues: Load any record where its key matches a value defined by <LoadCriteria> tag (below)
<LoadCriteria>

Required if the <Mode> is set to AllKeyValues or AnyKeyValue. Filters the records being loaded to those that match one or all of the <LoadCriteria> values. You can use multiple <LoadCriteria> tags within each <UsedClass> tag.

Possible values for List_PersonAddress:

  • Current: Specifies that you only want to return values that are current based on their effective date.
  • PrimaryResidence
  • Mailing
  • Secondary

Possible values for List_PersonContact:

  • BusinessEmail
  • BusinessFax
  • BusinessMobile
  • BusinessPhone
  • Current: Specifies that you only want to return values that are current based on their effective date.
  • HomePhone
  • InstantPaycard
  • Mobile
  • PersonalEmail
  • PersonalFax
  • PersonalPaycard
  • System_LinkedIn
  • System_Twitter

For example:

Copy
<WF_DynamicForm>
    <DataClass>Employee</DataClass>
    <FormHeader>
        <Style>header</Style>
        <Title>title</Title>
    </FormHeader>
    <UsedClass>
        <Name>List_PersonAddress</Name>
        <Mode>AnyKeyValues<Mode>
        <LoadCriteria>PrimaryResidence</LoadCriteria>
        <LoadCriteria>Mailing</LoadCriteria>
    </UsedClass>