Skip to main content

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

NameDataTypeList Options                          Description
tablenamestringThe parent table to search
columnstringThe column within tablename to search on
valuestringThe value to search on tablename.column
itemschildThe child items to search on for the best fit
datastringThe source data to use for searching (e.g. 'Employee' or 'Schedule'); this is the source for satisfying all filters in the best-fit algorithm
transactiondatedatetimeThe datafield in the source data to use for searching (e.g. the PayDate of a timesheet, or TransactionDate of a transactional record)
startdatedatetimeThe field which optionally holds an effective starting date for the child item
enddatedatetimeThe field which optional holds an effective ending date for the child item
returnvalueNoneThe column in the child items to return once a best fit is chosen