From 4a84715e2b0692a58eaf074fb3e33c97d4353523 Mon Sep 17 00:00:00 2001 From: Natalie Misasi <87094477+nataliemisasi@users.noreply.github.com> Date: Thu, 6 Jan 2022 15:20:10 -0600 Subject: [PATCH 1/2] Update table.py: point UserTable.lookupRecords to a CONTAINS example (#118) --- sandbox/grist/table.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sandbox/grist/table.py b/sandbox/grist/table.py index ea30db4b..202c2aed 100644 --- a/sandbox/grist/table.py +++ b/sandbox/grist/table.py @@ -89,6 +89,9 @@ class UserTable(object): ``` See [RecordSet](#recordset) for useful properties offered by the returned object. + + See [CONTAINS](#contains) for an example utilizing `UserTable.lookupRecords` to find records where + a field of a list type (such as `Choice List` or `Reference List`) contains the given value. """ return self.table.lookup_records(**field_value_pairs) From 206e1550d57ee177757ac7088ba1a9478225fd05 Mon Sep 17 00:00:00 2001 From: Natalie Misasi <87094477+nataliemisasi@users.noreply.github.com> Date: Thu, 6 Jan 2022 15:20:47 -0600 Subject: [PATCH 2/2] Update lookup.py: include into CONTAINS a link to lookupRecords (#119) --- sandbox/grist/functions/lookup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sandbox/grist/functions/lookup.py b/sandbox/grist/functions/lookup.py index 9f6989d4..7297e29b 100644 --- a/sandbox/grist/functions/lookup.py +++ b/sandbox/grist/functions/lookup.py @@ -153,8 +153,8 @@ def VLOOKUP(table, **field_value_pairs): class _Contains(namedtuple("_Contains", "value")): """ - Use this marker with `Table.lookupRecords` to find records - where a column contains the given value, e.g: + 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, e.g: MoviesTable.lookupRecords(genre=CONTAINS("Drama"))