diff --git a/help/en/docs/functions.md b/help/en/docs/functions.md index ab56ff705..b91ed35fe 100644 --- a/help/en/docs/functions.md +++ b/help/en/docs/functions.md @@ -120,13 +120,24 @@ Table.lookupRecords(..., order_by=("Foo", "Bar")).find.le(foo, bar) If the `find` attribute is shadowed by a same-named user column, you may use `_find` instead. +In the following methods, "less" is best understood as "before" +and "greater" is best understood as "after". +For example, if you use a negative `order_by` on a simple integer column, +then the meaning of "less than" and "greater than" will be flipped. + The methods available are: -- __`lt`__: (less than) find nearest record with sort values < the given values -- __`le`__: (less than or equal to) find nearest record with sort values <= the given values -- __`gt`__: (greater than) find nearest record with sort values > the given values -- __`ge`__: (greater than or equal to) find nearest record with sort values >= the given values -- __`eq`__: (equal to) find nearest record with sort values == the given values +- __`lt`__: ("less than") Finds the nearest (last) record where the sort values are **before** the + given values. +- __`le`__: ("less than or equal to") Finds the last record where the sort values are **equal to + or before** the given values. +- __`gt`__: ("greater than") Finds the nearest (first) record where the sort values are **after** + the given values. +- __`ge`__: ("greater than or equal to") Finds the first record where the sort values are **equal + to or after** the given values. +- __`eq`__: ("equal to") Finds the first record where the sort values are **equal to** the given + values. + Example from [our Payroll template](https://templates.getgrist.com/5pHLanQNThxk/Payroll). Each person has a history of pay rates, in the Rates table. To find a rate applicable on a