Configuring the DBLookup of the slave input field to use the SQL expression

  1. Select Timesheet.
  2. Click the Turn ON config mode icon.
  3. Select any employee’s timesheet using the Timesheet Selection page, and click Load.
  4. Locate the slave input field that you want to filter in the Details or Premiums row. For example, Department.
  5. Click the localization (orange diamond) icon in the row cell of the field you want to filter. For example, DEPT_NAME.
    The Field Localization window is displayed.
  6. Specify the appropriate SQL statement in the Field Parameters field. For example:
    sourceType='SQL'
    width='7'
    source='select DEPT_NAME, DEPT_LOC_NAME, WBT_NAME
    from VL_DEPARTMENT, WORKBRAIN_TEAM
    WHERE VL_DEPARTMENT.WBT_ID = WORKBRAIN_TEAM.WBT_ID AND TO_DATE(cast(? as char(17)), \'yyyymmdd hh24miss\') <= DEPT_END_DATE and DEPT_START_DATE <= TO_DATE(cast(? as char(17)), \'yyyymmdd hh24miss\')'
    sourceParams='STRING==#request.WORK_DATE#~|~STRING==#request.WORK_DATE#'
    sourceDisplayFields='DEPT_LOC_NAME'
    locale='en'
    labelFieldStatus=edit
    masterSlaveUseXPath='true'
    masterInputFields='[ancestor::tr/td[@data-field=\'WBT_NAME\']/input]'
    masterDataFields=[WBT_NAME]

    See Modifying the SQL expression.

  7. Click Save and close the window.
  8. Click the Turn OFF config mode icon.