Skip to main content

BEST_FIT

Find the best fit match in a related store (e.g. finding schedules, leave or other transactional items)

Example Usage

BEST_FIT(Schedules, Employees, PayDate, StartDate, EndDate, )  // search Schedules using Employee and schedules where StartDate/EndDate match the current time 

Overview

Function signature
BEST_FIT(tablename, filter, transactiondate, startdate, enddate, returnvalue)

Category
Database

Return data type
None

Arguments

NameDataTypeList Options                          Description
tablenamestringThe parent table to search
filterstringThe source data value to use for searching (e.g. 'Employee' or 'Schedule'); this is the source for satisfying all filters in the best-fit algorithm
transactiondatedatetimeThe date field in the source data to use when searching on dates in the target
startdatedatetimeThe field which optionally holds an effective starting date for the item
enddatedatetimeThe field which optional holds an effective ending date for the item
returnvalueNoneThe column in the search store to return once a best fit is chosen; if omitted the entire record is returned