You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/components/AssemblyLine/al_courts.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,14 +183,14 @@ Create a new courtloader object.
183
183
#### all\_courts()
184
184
185
185
```python
186
-
def all_courts() -> List[Dict[int, str]]
186
+
def all_courts() -> List[Tuple[int, str]]
187
187
```
188
188
189
189
Return a list of all courts in the spreadsheet.
190
190
191
191
**Returns**:
192
192
193
-
List[Dict[int, str]]: List of all ALCourt instances without filtering.
193
+
List[Tuple[int, str]]: List of tuples where each tuple contains (dataframe_index, display_value). The dataframe_index (int) can be used with as_court() to retrieve the full court object. The display_value (str) is the court's name or other display column value.
Retrieve a list of all courts in the specified county.
299
299
300
300
This function fetches courts suitable for displaying as a drop-down or radio button list
301
-
in Docassemble. The results are dictionaries where the key is the index in the dataframe,
302
-
useful for retrieving the court's full details later using the as_court() method.
301
+
in Docassemble. The results are tuples where the first element is the dataframe index
302
+
(useful for retrieving the court's full details later using the as_court() method) and
303
+
the second element is the display value from the specified display_column.
303
304
304
305
**Arguments**:
305
306
@@ -313,7 +314,7 @@ useful for retrieving the court's full details later using the as_court() m
313
314
314
315
**Returns**:
315
316
316
-
List[Dict[int, str]]: List of dictionaries representing matching courts.
317
+
List[Tuple[int, str]]: List of tuples where each tuple contains (dataframe_index, display_value). The dataframe_index (int) can be used with as_court() to retrieve the full court object. The display_value (str) is the court's name or other display column value.
Return a filtered subset of courts represented as a list of dictionaries.
333
+
Return a filtered subset of courts represented as a list of tuples.
333
334
334
-
Each dictionary has the format\{index: name\}, where "index" refers to the dataframe index and "name"
335
+
Each tuple has the format(index, display_value), where "index" refers to the dataframe index and"display_value"
335
336
is determined by the `display_column`.
336
337
337
338
**Arguments**:
@@ -347,7 +348,7 @@ is determined by the `display_column`.
347
348
348
349
**Returns**:
349
350
350
-
List[Dict[int, str]]: List of dictionaries representing filtered courts.
351
+
List[Tuple[int, str]]: List of tuples where each tuple contains (dataframe_index, display_value). The dataframe_index (int) can be used with as_court() to retrieve the full court object. The display_value (str) is the court's name or other display column value.
0 commit comments