Configuring the DBLookup of the secondary input field to use the SQL expression
- Select Timesheet.
- Click the Turn ON config mode icon.
- Select any employee’s timesheet using the Timesheet Selection page, and click Load.
- Locate the secondary input field that you want to filter in the Details or Premiums row. For example, Department.
-
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.
-
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 primarySecondaryUseXPath='true' primaryInputFields='[ancestor::tr/td[@data-field=\'WBT_NAME\']/input]' primaryDataFields=[WBT_NAME]
- Click Save and close the window.
- Click the Turn OFF config mode icon.