Tweaks to documentation comments for user-facing Grist functions (#126)

- Update internal links in function documentation
- Remove emphasis in code blocks
- Remove trailing whitespace
This commit is contained in:
Dmitry
2022-02-13 00:45:24 -05:00
committed by GitHub
parent 2611d05c39
commit 25b7e6c245
4 changed files with 21 additions and 21 deletions

View File

@@ -81,16 +81,16 @@ class UserTable(object):
"""
Name: lookupRecords
Usage: UserTable.__lookupRecords__(Field_In_Lookup_Table=value, ...)
Returns a RecordSet matching the given field=value arguments. The value may be any expression,
most commonly a field in the current row (e.g. `$SomeField`) or a constant (e.g. a quoted string
like `"Some Value"`) (examples below).
Returns a [RecordSet](#recordset) matching the given field=value arguments. The value may be any expression,
most commonly a field in the current row (e.g. `$SomeField`) or a constant (e.g. a quoted string
like `"Some Value"`) (examples below).
If `sort_by=field` is given, sort the results by that field.
For example:
```
People.*lookupRecords*(Email=$Work_Email)
People.*lookupRecords*(First_Name="George", Last_Name="Washington")
People.*lookupRecords*(Last_Name="Johnson", sort_by="First_Name")
People.lookupRecords(Email=$Work_Email)
People.lookupRecords(First_Name="George", Last_Name="Washington")
People.lookupRecords(Last_Name="Johnson", sort_by="First_Name")
```
See [RecordSet](#recordset) for useful properties offered by the returned object.
@@ -105,15 +105,15 @@ class UserTable(object):
"""
Name: lookupOne
Usage: UserTable.__lookupOne__(Field_In_Lookup_Table=value, ...)
Returns a Record matching the given field=value arguments. The value may be any expression,
most commonly a field in the current row (e.g. `$SomeField`) or a constant (e.g. a quoted string
like `"Some Value"`). If multiple records match, returns one of them. If none match, returns the
Returns a [Record](#record) matching the given field=value arguments. The value may be any expression,
most commonly a field in the current row (e.g. `$SomeField`) or a constant (e.g. a quoted string
like `"Some Value"`). If multiple records match, returns one of them. If none match, returns the
special empty record.
For example:
```
People.*lookupOne*(First_Name="Lewis", Last_Name="Carroll")
People.*lookupOne*(Email=$Work_Email)
People.lookupOne(First_Name="Lewis", Last_Name="Carroll")
People.lookupOne(Email=$Work_Email)
```
"""
return self.table.lookup_one_record(**field_value_pairs)