BEST_FIT_ITEMS
Find the best fit match in a child store (e.g. finding rates, status, other demographic items) of a looked-up parent store
Example Usage
BEST_FIT_ITEMS(Shift Premium, Code, Rate Table, Rates, FIND(employee), PayDate, EffectiveDate, ExpireDate, Rate
Overview
Function signature
BEST_FIT_ITEMS(tablename, column, value, items, data, transactiondate, startdate, enddate, returnvalue)
Category
Database
Return data type
None
Arguments
Name | DataType | List Options | Description |
---|---|---|---|
tablename | string | The parent table to search | |
column | string | The column within tablename to search on | |
value | string | The value to search on tablename.column | |
items | child | The child items to search on for the best fit | |
data | string | The source data to use for searching (e.g. 'Employee' or 'Schedule'); this is the source for satisfying all filters in the best-fit algorithm | |
transactiondate | datetime | The datafield in the source data to use for searching (e.g. the PayDate of a timesheet, or TransactionDate of a transactional record) | |
startdate | datetime | The field which optionally holds an effective starting date for the child item | |
enddate | datetime | The field which optional holds an effective ending date for the child item | |
returnvalue | None | The column in the child items to return once a best fit is chosen |