# list command

The list command generates formatted
output based upon the specified arguments. If an item list is specified,
items are listed in order of the item-IDs in the item list. If an
item list is not specified, items are listed by the groups into which
they hash, and within each group, each item is listed in the order
in which it was entered or most recently updated.

**Synonyms:** l

The report is either produced in a columnar or a noncolumnar
format. This is determined by the total width of all the attribute-defining
items requested, plus the width of the item-ID column. If the total
of all these ADIs (plus one space between each column) is less than
the current device width (defined by the term command),
the report is produced in columns. Otherwise, the report goes to the
noncolumnar output format.

Note: If by is provided
with a command that does not naturally sort (such as the list command), the command is changed to its sorting counterpart
(for example, list becomes sort, select becomes sselect, and
so on).

## Syntax

```
list file.reference {item.list} {selection.criteria} {modifiers}
{output.specification} {(options)}
```

## Example(s)

This lists the entity file displaying
the attributes specified in the file’s macro or output-macro.

```
list entity
```
This lists the surname and phone attributes of entity
items that contain the text `Brown` in the surname.
The report has headings and footings and is output to the printer
without legends or the number of items message.

```
list entity with surname "[Brown]" name phone heading "’c’Brown People In Entity’
lcdxcjpll’"footing "’ll’Company Confidential" ni-supp (pk

 Brown People In Entity
 Feb 14 2004 Page 1
entity.... name.................... phone.......
99999 Browning Joe 818-555-1212
 213-555-1212
12345 Brown Sally 619-555-1212
 714-555-1212
88822 Albrown Mike 909-555-1212
:
Company Confidential
```

## See also

- [Access Query Language](https://d3codex.com/access/access-query-language/)
- [AQL command categories](https://d3codex.com/access/aql-command-categories/)
- [Default attribute items (Attribute-Defining Items)](https://d3codex.com/attributedefiningitem/default-attribute-items-attribute-defining-items/)
- [File reference (Access Query Language)](https://d3codex.com/access/file-reference-access-query-language/)
- [Item list](https://d3codex.com/access/item-list/)
- [Modifiers](https://d3codex.com/access/modifiers/)
- [Options (Access Query Language)](https://d3codex.com/access/options-access-query-language/)
- [Selection criteria](https://d3codex.com/access/selection-criteria/)
- [sort command](https://d3codex.com/access/sort-command/)
- [term command](https://d3codex.com/tcl/term-command/)
- [within modifier](https://d3codex.com/access/within-modifier/)
- [wlist command](https://d3codex.com/tcl/wlist-command/)

---
Source: https://d3codex.com/access/list-command/ - part of the D3Codex reference.
