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
Name | DataType | List Options | Description |
---|---|---|---|
tablename | string | The parent table to search | |
filter | string | The 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 | |
transactiondate | datetime | The date field in the source data to use when searching on dates in the target | |
startdate | datetime | The field which optionally holds an effective starting date for the item | |
enddate | datetime | The field which optional holds an effective ending date for the item | |
returnvalue | None | The column in the search store to return once a best fit is chosen; if omitted the entire record is returned |