From f58dbfa4d0bc4128918218ffaeab5284026ba6dd Mon Sep 17 00:00:00 2001 From: Spoffy <4805393+Spoffy@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:28:13 +0100 Subject: [PATCH] Fixes function searching and jumping (#389) - Reworks how function names are rendered on the functions page, meaning we don't need a hidden header element. - Adds attr_list as an extension (I think it should always have been there?) - Adds styling to make the (now visible) header elements match what was there before. - Fixes sections not expanding when jumped to via permalink or searching --- help/en/docs/css/grist.css | 14 +- help/en/docs/functions.md | 1448 ++++++++++++------------------------ help/en/docs/js/grist.js | 17 +- mkdocs.yml | 1 + mkpydocs.py | 6 +- 5 files changed, 509 insertions(+), 977 deletions(-) diff --git a/help/en/docs/css/grist.css b/help/en/docs/css/grist.css index d4c428632..4a8bc57a5 100644 --- a/help/en/docs/css/grist.css +++ b/help/en/docs/css/grist.css @@ -316,16 +316,16 @@ body { } /* - * We want headers for the sake of searching, but don't want to see the huge padding and - * surrounding empty paragraphs. + * Hide the empty paragraphs that are generated around headers in the expanding sections. */ -.wm-page-content summary h4, -.wm-page-content summary p { +.wm-page-content summary p:empty { display: none; } -/* The block that serves as a function header annoyingly gets auto-wrapped in a

*/ -.wm-page-content summary p:not(:first-child) { - display: inline-block; + +/* + * Clean up any extra space used by paragraphs in the header. + */ +.wm-page-content summary p { margin: 0; } diff --git a/help/en/docs/functions.md b/help/en/docs/functions.md index 0056e5e86..a19a3c367 100644 --- a/help/en/docs/functions.md +++ b/help/en/docs/functions.md @@ -1,3 +1,11 @@ + + # Function Reference {: data-toc-label='' } Grist formulas support most Excel functions, as well as the Python programming language. @@ -35,10 +43,8 @@ Python (see [Python documentation](https://docs.python.org/3.11/)). Here are som ### Grist -

-#### Record -class __Record__ -# +
+#### class __Record__ {: #record data-toc-label="Record" } A Record represents a record of data. It is the primary means of accessing values in formulas. A Record for a particular table has a property for each data and formula column in the table. @@ -55,17 +61,13 @@ def Name_Length(rec, table): return len(rec.Full_Name) ```
-
-#### $Field -__$__*Field* or __rec__*.Field* -# +
+#### __$__*Field* or __rec__*.Field* {: #_field data-toc-label="$Field" } Access the field named "Field" of the current record. E.g. `$First_Name` or `rec.First_Name`.
-
-#### $group -__$group__ -# +
+#### __$group__ {: #_group data-toc-label="$group" } In a [summary table](summary-tables.md), `$group` is a special field containing the list of Records that are summarized by the current summary line. E.g. the @@ -81,10 +83,8 @@ sum(r.Amount for r in $group if r > 0) # Sum of only the positive amounts sum(r.Shares * r.Price for r in $group) # Sum of shares * price products ```
-
-#### RecordSet -class __RecordSet__ -# +
+#### class __RecordSet__ {: #recordset data-toc-label="RecordSet" } A RecordSet represents a collection of records, as returned by `Table.lookupRecords()` or `$group` property in summary views. @@ -104,10 +104,8 @@ min(Tasks.lookupRecords(Owner="Bob").DueDate) You can get the number of records in a RecordSet using `len`, e.g. `len($group)`.
-
-#### find.* -RecordSet.**find.\***(value) -# +
+#### RecordSet.**find.\***(value) {: #find_ data-toc-label="find.*" } A set of methods for finding values in sorted sets of records, as returned by [`lookupRecords`](#lookuprecords). For example: @@ -152,10 +150,8 @@ return rate.Hourly_Rate Note that this is also much faster when there are many rates for the same Person and Role.
-
-#### UserTable -class __UserTable__ -# +
+#### class __UserTable__ {: #usertable data-toc-label="UserTable" } Each data table in the document is represented in the code by an instance of `UserTable` class. These names are always capitalized. A UserTable provides access to all the records in the table, @@ -163,10 +159,8 @@ as well as methods to look up particular records. Every table in the document is available to all formulas.
-
-#### all -UserTable.__all__ -# +
+#### UserTable.__all__ {: #all data-toc-label="all" } The list of all the records in this table. @@ -180,10 +174,8 @@ This evaluates to the sum of the `Population` field for every record in the tabl sum(r.Population for r in Countries.all) ```
-
-#### lookupOne -UserTable.__lookupOne__(Field_In_Lookup_Table=value, ...) -# +
+#### UserTable.__lookupOne__(Field_In_Lookup_Table=value, ...) {: #lookupone data-toc-label="lookupOne" } Returns a [Record](#record) matching the given field=value arguments. The value may be any expression, @@ -211,10 +203,8 @@ Tasks.lookupOne(Project=$id, order_by="Priority") # Task with the smallest Prio Rates.lookupOne(Person=$id, order_by="-Date") # Rate with the latest Date. ```
-
-#### lookupRecords -UserTable.__lookupRecords__(Field_In_Lookup_Table=value, ...) -# +
+#### UserTable.__lookupRecords__(Field_In_Lookup_Table=value, ...) {: #lookuprecords data-toc-label="lookupRecords" } Returns a [RecordSet](#recordset) matching the given field=value arguments. The value may be any expression, @@ -257,18 +247,14 @@ value. Learn more about [lookupRecords](references-lookups.md#lookuprecords).
### Cumulative -
-#### NEXT -__NEXT__(rec, *, group_by=(), order_by) -# +
+#### __NEXT__(rec, *, group_by=(), order_by) {: #next data-toc-label="NEXT" } Finds the next record in the table according to the order specified by `order_by`, and grouping specified by `group_by`. See [`PREVIOUS`](#previous) for details.
-
-#### PREVIOUS -__PREVIOUS__(rec, *, group_by=(), order_by) -# +
+#### __PREVIOUS__(rec, *, group_by=(), order_by) {: #previous data-toc-label="PREVIOUS" } Finds the previous record in the table according to the order specified by `order_by`, and grouping specified by `group_by`. Each of these arguments may be a column ID or a tuple of @@ -303,10 +289,8 @@ used to match views sorted by multiple columns. For example: PREVIOUS(rec, group_by=("Account", "Year"), order_by=("Date", "-Amount")) ```
-
-#### RANK -__RANK__(rec, *, group_by=(), order_by, order='asc') -# +
+#### __RANK__(rec, *, group_by=(), order_by, order='asc') {: #rank data-toc-label="RANK" } Returns the rank (or position) of this record in the table according to the order specified by `order_by`, and grouping specified by `group_by`. See [`PREVIOUS`](#previous) for details of @@ -326,10 +310,8 @@ the current record (`rec`) among all the records in its table for the same year, decreasing score.
### Date -
-#### DATE -__DATE__(year, month, day) -# +
+#### __DATE__(year, month, day) {: #date data-toc-label="DATE" } Returns the `datetime.datetime` object that represents a particular date. The DATE function is most useful in formulas where year, month, and day are formulas, not @@ -375,10 +357,8 @@ If day is less than 1, subtracts that many days plus 1, from the first day of th datetime.date(2007, 12, 16) ```
-
-#### DATEADD -__DATEADD__(start_date, days=0, months=0, years=0, weeks=0) -# +
+#### __DATEADD__(start_date, days=0, months=0, years=0, weeks=0) {: #dateadd data-toc-label="DATEADD" } Returns the date a given number of days, months, years, or weeks away from `start_date`. You may specify arguments in any order if you specify argument names. Use negative values to subtract. @@ -408,10 +388,8 @@ datetime.date(2025, 3, 26) ```
-
-#### DATEDIF -__DATEDIF__(start_date, end_date, unit) -# +
+#### __DATEDIF__(start_date, end_date, unit) {: #datedif data-toc-label="DATEDIF" } Calculates the number of days, months, or years between two dates. Unit indicates the type of information that you want returned: @@ -454,10 +432,8 @@ The difference between 1 and 15, ignoring the months and the years of the dates 14 ```
-
-#### DATEVALUE -__DATEVALUE__(date_string, tz=None) -# +
+#### __DATEVALUE__(date_string, tz=None) {: #datevalue data-toc-label="DATEVALUE" } Converts a date that is stored as text to a `datetime` object. @@ -489,10 +465,8 @@ In case of ambiguity, prefer M/D/Y format. datetime.datetime(2003, 1, 2, 0, 0, tzinfo=moment.tzinfo('America/New_York')) ```
-
-#### DATE_TO_XL -__DATE_TO_XL__(date_value) -# +
+#### __DATE_TO_XL__(date_value) {: #date_to_xl data-toc-label="DATE_TO_XL" } Converts a Python `date` or `datetime` object to the serial number as used by Excel, with December 30, 1899 as serial number 1. @@ -515,10 +489,8 @@ See XL_TO_DATE for more explanation. 40982.0625 ```
-
-#### DAY -__DAY__(date) -# +
+#### __DAY__(date) {: #day data-toc-label="DAY" } Returns the day of a date, as an integer ranging from 1 to 31. Same as `date.day`. @@ -539,10 +511,8 @@ Returns the day of a date, as an integer ranging from 1 to 31. Same as `date.day ```
-
-#### DAYS -__DAYS__(end_date, start_date) -# +
+#### __DAYS__(end_date, start_date) {: #days data-toc-label="DAYS" } Returns the number of days between two dates. Same as `(end_date - start_date).days`. @@ -563,10 +533,8 @@ Returns the number of days between two dates. Same as `(end_date - start_date).d ```
-
-#### DTIME -__DTIME__(value, tz=None) -# +
+#### __DTIME__(value, tz=None) {: #dtime data-toc-label="DTIME" } Returns the value converted to a python `datetime` object. The value may be a `string`, `date` (interpreted as midnight on that day), `time` (interpreted as a @@ -608,10 +576,8 @@ datetime.datetime(2008, 1, 1, 0, 0, tzinfo=moment.tzinfo('America/New_York')) ```
-
-#### EDATE -__EDATE__(start_date, months) -# +
+#### __EDATE__(start_date, months) {: #edate data-toc-label="EDATE" } Returns the date that is the given number of months before or after `start_date`. Use EDATE to calculate maturity dates or due dates that fall on the same day of the month as the @@ -644,10 +610,8 @@ datetime.date(2012, 3, 1) ```
-
-#### EOMONTH -__EOMONTH__(start_date, months) -# +
+#### __EOMONTH__(start_date, months) {: #eomonth data-toc-label="EOMONTH" } Returns the date for the last day of the month that is the indicated number of months before or after start_date. Use EOMONTH to calculate maturity dates or due dates that fall on the last day @@ -675,10 +639,8 @@ datetime.date(2012, 3, 31) ```
-
-#### HOUR -__HOUR__(time) -# +
+#### __HOUR__(time) {: #hour data-toc-label="HOUR" } Same as `time.hour`. @@ -699,10 +661,8 @@ Same as `time.hour`. ```
-
-#### ISOWEEKNUM -__ISOWEEKNUM__(date) -# +
+#### __ISOWEEKNUM__(date) {: #isoweeknum data-toc-label="ISOWEEKNUM" } Returns the ISO week number of the year for a given date. @@ -718,10 +678,8 @@ Returns the ISO week number of the year for a given date. ```
-
-#### MINUTE -__MINUTE__(time) -# +
+#### __MINUTE__(time) {: #minute data-toc-label="MINUTE" } Returns the minutes of `datetime`, as an integer from 0 to 59. Same as `time.minute`. @@ -748,10 +706,8 @@ Same as `time.minute`. ```
-
-#### MONTH -__MONTH__(date) -# +
+#### __MONTH__(date) {: #month data-toc-label="MONTH" } Returns the month of a date represented, as an integer from from 1 (January) to 12 (December). Same as `date.month`. @@ -773,10 +729,8 @@ Same as `date.month`. ```
-
-#### MOONPHASE -__MOONPHASE__(date, output='emoji') -# +
+#### __MOONPHASE__(date, output='emoji') {: #moonphase data-toc-label="MOONPHASE" } Returns the phase of the moon on the given date. The output defaults to a moon-phase emoji. @@ -824,17 +778,13 @@ True ```
-
-#### NOW -__NOW__(tz=None) -# +
+#### __NOW__(tz=None) {: #now data-toc-label="NOW" } Returns the `datetime` object for the current time.
-
-#### SECOND -__SECOND__(time) -# +
+#### __SECOND__(time) {: #second data-toc-label="SECOND" } Returns the seconds of `datetime`, as an integer from 0 to 59. Same as `time.second`. @@ -856,17 +806,13 @@ Same as `time.second`. ```
-
-#### TODAY -__TODAY__(tz=None) -# +
+#### __TODAY__(tz=None) {: #today data-toc-label="TODAY" } Returns the `date` object for the current date.
-
-#### WEEKDAY -__WEEKDAY__(date, return_type=1) -# +
+#### __WEEKDAY__(date, return_type=1) {: #weekday data-toc-label="WEEKDAY" } Returns the day of the week corresponding to a date. The day is given as an integer, ranging from 1 (Sunday) to 7 (Saturday), by default. @@ -910,10 +856,8 @@ Return_type determines the type of the returned value. 3 ```
-
-#### WEEKNUM -__WEEKNUM__(date, return_type=1) -# +
+#### __WEEKNUM__(date, return_type=1) {: #weeknum data-toc-label="WEEKNUM" } Returns the week number of a specific date. For example, the week containing January 1 is the first week of the year, and is numbered week 1. @@ -953,10 +897,8 @@ Return_type determines which week is considered the first week of the year. 5 ```
-
-#### XL_TO_DATE -__XL_TO_DATE__(value, tz=None) -# +
+#### __XL_TO_DATE__(value, tz=None) {: #xl_to_date data-toc-label="XL_TO_DATE" } Converts a provided Excel serial number representing a date into a `datetime` object. Value is interpreted as the number of days since December 30, 1899. @@ -984,10 +926,8 @@ datetime.datetime(2008, 1, 1, 0, 0, tzinfo=moment.tzinfo('America/New_York')) datetime.datetime(2012, 3, 14, 1, 30, tzinfo=moment.tzinfo('America/New_York')) ```
-
-#### YEAR -__YEAR__(date) -# +
+#### __YEAR__(date) {: #year data-toc-label="YEAR" } Returns the year corresponding to a date as an integer. Same as `date.year`. @@ -1009,10 +949,8 @@ Same as `date.year`. ```
-
-#### YEARFRAC -__YEARFRAC__(start_date, end_date, basis=0) -# +
+#### __YEARFRAC__(start_date, end_date, basis=0) {: #yearfrac data-toc-label="YEARFRAC" } Calculates the fraction of the year represented by the number of whole days between two dates. @@ -1060,29 +998,23 @@ Fraction between same dates, using the Actual/365 basis argument. Uses a 365 day ```
### Info -
-#### CELL -__CELL__(info_type, reference) -# +
+#### __CELL__(info_type, reference) {: #cell data-toc-label="CELL" } Returns the requested information about the specified cell. This is not implemented in Grist NoteThis function is not currently implemented in Grist.
-
-#### ISBLANK -__ISBLANK__(value) -# +
+#### __ISBLANK__(value) {: #isblank data-toc-label="ISBLANK" } Returns whether a value refers to an empty cell. It isn't implemented in Grist. To check for an empty string, use `value == ""`. NoteThis function is not currently implemented in Grist.
-
-#### ISEMAIL -__ISEMAIL__(value) -# +
+#### __ISEMAIL__(value) {: #isemail data-toc-label="ISEMAIL" } Returns whether a value is a valid email address. @@ -1111,10 +1043,8 @@ False False ```
-
-#### ISERR -__ISERR__(value) -# +
+#### __ISERR__(value) {: #iserr data-toc-label="ISERR" } Checks whether a value is an error. In other words, it returns true if using `value` directly would raise an exception. @@ -1137,10 +1067,8 @@ For example: False ```
-
-#### ISERROR -__ISERROR__(value) -# +
+#### __ISERROR__(value) {: #iserror data-toc-label="ISERROR" } Checks whether a value is an error or an invalid value. It is similar to `ISERR`, but also returns true for an invalid value such as NaN or a text value in a Numeric column. @@ -1163,10 +1091,8 @@ True True ```
-
-#### ISLOGICAL -__ISLOGICAL__(value) -# +
+#### __ISLOGICAL__(value) {: #islogical data-toc-label="ISLOGICAL" } Checks whether a value is `True` or `False`. @@ -1197,10 +1123,8 @@ False ```
-
-#### ISNA -__ISNA__(value) -# +
+#### __ISNA__(value) {: #isna data-toc-label="ISNA" } Checks whether a value is the error `#N/A`. @@ -1226,10 +1150,8 @@ False ```
-
-#### ISNONTEXT -__ISNONTEXT__(value) -# +
+#### __ISNONTEXT__(value) {: #isnontext data-toc-label="ISNONTEXT" } Checks whether a value is non-textual. @@ -1265,10 +1187,8 @@ True ```
-
-#### ISNUMBER -__ISNUMBER__(value) -# +
+#### __ISNUMBER__(value) {: #isnumber data-toc-label="ISNUMBER" } Checks whether a value is a number. @@ -1313,10 +1233,8 @@ False False ```
-
-#### ISREF -__ISREF__(value) -# +
+#### __ISREF__(value) {: #isref data-toc-label="ISREF" } Checks whether a value is a table record. @@ -1337,10 +1255,8 @@ False ```
-
-#### ISREFLIST -__ISREFLIST__(value) -# +
+#### __ISREFLIST__(value) {: #isreflist data-toc-label="ISREFLIST" } Checks whether a value is a [`RecordSet`](#recordset), the type of values in Reference List columns. @@ -1362,10 +1278,8 @@ False ```
-
-#### ISTEXT -__ISTEXT__(value) -# +
+#### __ISTEXT__(value) {: #istext data-toc-label="ISTEXT" } Checks whether a value is text. @@ -1401,10 +1315,8 @@ False ```
-
-#### ISURL -__ISURL__(value) -# +
+#### __ISURL__(value) {: #isurl data-toc-label="ISURL" } Checks whether a value is a valid URL. It does not need to be fully qualified, or to include "http://" and "www". It does not follow a standard, but attempts to work similarly to ISURL in @@ -1433,10 +1345,8 @@ True False ```
-
-#### N -__N__(value) -# +
+#### __N__(value) {: #n data-toc-label="N" } Returns the value converted to a number. True/False are converted to 1/0. A date is converted to Excel-style serial number of the date. Anything else is converted to 0. @@ -1473,10 +1383,8 @@ Excel-style serial number of the date. Anything else is converted to 0. ```
-
-#### NA -__NA__() -# +
+#### __NA__() {: #na data-toc-label="NA" } Returns the "value not available" error, `#N/A`. @@ -1487,10 +1395,8 @@ True ```
-
-#### PEEK -__PEEK__(func) -# +
+#### __PEEK__(func) {: #peek data-toc-label="PEEK" } Evaluates the given expression without creating dependencies or requiring that referenced values are up to date, using whatever value it finds in a cell. @@ -1502,10 +1408,8 @@ calculated before the other. But if `A` uses `PEEK($B)` then it will simply get already stored in `$B` without requiring that `$B` is first calculated to the latest value. Therefore `A` will be calculated first, and `B` can use `$A` without problems.
-
-#### RECORD -__RECORD__(record_or_list, dates_as_iso=False, expand_refs=0) -# +
+#### __RECORD__(record_or_list, dates_as_iso=False, expand_refs=0) {: #record_2 data-toc-label="RECORD" } Returns a Python dictionary with all fields in the given record. If a list of records is given, returns a list of corresponding Python dictionaries. @@ -1531,18 +1435,14 @@ RECORD(People.lookupOne(First_Name="Alice")) RECORD(People.lookupRecords(Department="HR")) ```
-
-#### REQUEST -__REQUEST__(url, params=None, headers=None, method='GET', data=None, json=None) -# +
+#### __REQUEST__(url, params=None, headers=None, method='GET', data=None, json=None) {: #request data-toc-label="REQUEST" } NoteThis function is not currently implemented in Grist.
-
-#### TYPE -__TYPE__(value) -# +
+#### __TYPE__(value) {: #type data-toc-label="TYPE" } Returns a number associated with the type of data passed into the function. This is not implemented in Grist. Use `isinstance(value, type)` or `type(value)`. @@ -1550,10 +1450,8 @@ implemented in Grist. Use `isinstance(value, type)` or `type(value)`. NoteThis function is not currently implemented in Grist.
### Logical -
-#### AND -__AND__(logical_expression, *logical_expressions) -# +
+#### __AND__(logical_expression, *logical_expressions) {: #and data-toc-label="AND" } Returns True if all of the arguments are logically true, and False if any are false. Same as `all([value1, value2, ...])`. @@ -1585,10 +1483,8 @@ False ```
-
-#### FALSE -__FALSE__() -# +
+#### __FALSE__() {: #false data-toc-label="FALSE" } Returns the logical value `False`. You may also use the value `False` directly. This function is provided primarily for compatibility with other spreadsheet programs. @@ -1600,10 +1496,8 @@ False ```
-
-#### IF -__IF__(logical_expression, value_if_true, value_if_false) -# +
+#### __IF__(logical_expression, value_if_true, value_if_false) {: #if data-toc-label="IF" } Returns one value if a logical expression is `True` and another if it is `False`. @@ -1645,10 +1539,8 @@ to evaluate to `1` rather than raise an exception. 0.0 ```
-
-#### IFERROR -__IFERROR__(value, value_if_error='') -# +
+#### __IFERROR__(value, value_if_error='') {: #iferror data-toc-label="IFERROR" } Returns the first argument if it is not an error value, otherwise returns the second argument if present, or a blank if the second argument is absent. @@ -1676,10 +1568,8 @@ NOTE: Grist handles values that raise an exception by wrapping them to use lazy '' ```
-
-#### NOT -__NOT__(logical_expression) -# +
+#### __NOT__(logical_expression) {: #not data-toc-label="NOT" } `True`. Same as `not logical_expression`. @@ -1695,10 +1585,8 @@ True ```
-
-#### OR -__OR__(logical_expression, *logical_expressions) -# +
+#### __OR__(logical_expression, *logical_expressions) {: #or data-toc-label="OR" } Returns True if any of the arguments is logically true, and false if all of the arguments are false. @@ -1741,10 +1629,8 @@ True ```
-
-#### TRUE -__TRUE__() -# +
+#### __TRUE__() {: #true data-toc-label="TRUE" } Returns the logical value `True`. You may also use the value `True` directly. This function is provided primarily for compatibility with other spreadsheet programs. @@ -1757,10 +1643,8 @@ True
### Lookup -
-#### lookupOne -UserTable.__lookupOne__(Field_In_Lookup_Table=value, ...) -# +
+#### UserTable.__lookupOne__(Field_In_Lookup_Table=value, ...) {: #lookupone_2 data-toc-label="lookupOne" } Returns a [Record](#record) matching the given field=value arguments. The value may be any expression, @@ -1788,10 +1672,8 @@ Tasks.lookupOne(Project=$id, order_by="Priority") # Task with the smallest Prio Rates.lookupOne(Person=$id, order_by="-Date") # Rate with the latest Date. ```
-
-#### lookupRecords -UserTable.__lookupRecords__(Field_In_Lookup_Table=value, ...) -# +
+#### UserTable.__lookupRecords__(Field_In_Lookup_Table=value, ...) {: #lookuprecords_2 data-toc-label="lookupRecords" } Returns a [RecordSet](#recordset) matching the given field=value arguments. The value may be any expression, @@ -1833,46 +1715,36 @@ value. Learn more about [lookupRecords](references-lookups.md#lookuprecords).
-
-#### ADDRESS -__ADDRESS__(row, column, absolute_relative_mode, use_a1_notation, sheet) -# +
+#### __ADDRESS__(row, column, absolute_relative_mode, use_a1_notation, sheet) {: #address data-toc-label="ADDRESS" } Returns a cell reference as a string. NoteThis function is not currently implemented in Grist.
-
-#### CHOOSE -__CHOOSE__(index, choice1, choice2) -# +
+#### __CHOOSE__(index, choice1, choice2) {: #choose data-toc-label="CHOOSE" } Returns an element from a list of choices based on index. NoteThis function is not currently implemented in Grist.
-
-#### COLUMN -__COLUMN__(cell_reference=None) -# +
+#### __COLUMN__(cell_reference=None) {: #column data-toc-label="COLUMN" } Returns the column number of a specified cell, with `A=1`. NoteThis function is not currently implemented in Grist.
-
-#### COLUMNS -__COLUMNS__(range) -# +
+#### __COLUMNS__(range) {: #columns data-toc-label="COLUMNS" } Returns the number of columns in a specified array or range. NoteThis function is not currently implemented in Grist.
-
-#### CONTAINS -__CONTAINS__(value, match_empty=no_match_empty) -# +
+#### __CONTAINS__(value, match_empty=no_match_empty) {: #contains data-toc-label="CONTAINS" } Use this marker with [UserTable.lookupRecords](#lookuprecords) to find records where a field of a list type (such as `Choice List` or `Reference List`) contains the given value. @@ -1901,100 +1773,78 @@ For example, given this formula: If `g` is `''` (i.e. equal to `match_empty`) then the column `genre` in the returned records will either be an empty list (or other container) or a list containing `g` as usual.
-
-#### GETPIVOTDATA -__GETPIVOTDATA__(value_name, any_pivot_table_cell, original_column_1, pivot_item_1=None, *args) -# +
+#### __GETPIVOTDATA__(value_name, any_pivot_table_cell, original_column_1, pivot_item_1=None, *args) {: #getpivotdata data-toc-label="GETPIVOTDATA" } Extracts an aggregated value from a pivot table that corresponds to the specified row and column headings. NoteThis function is not currently implemented in Grist.
-
-#### HLOOKUP -__HLOOKUP__(search_key, range, index, is_sorted) -# +
+#### __HLOOKUP__(search_key, range, index, is_sorted) {: #hlookup data-toc-label="HLOOKUP" } Horizontal lookup. Searches across the first row of a range for a key and returns the value of a specified cell in the column found. NoteThis function is not currently implemented in Grist.
-