> For the complete documentation index, see [llms.txt](https://flapjax.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flapjax.gitbook.io/docs/automations/actions/records.md).

# Records

#### Create Record

Create a new record in a stack.

* **Stack**, the stack you create the record in.
* **External ID**, an optional identifier. It supports variables.
* **Attribute fields**, one per attribute on the stack, matching its data type. Set values directly, or use variables.

#### Update Record

Update an existing record in a stack.

* **Stack**, the stack you work in.
* **Record**, a specific record, or a variable from an earlier action such as a record Find Records returned.
* **Attributes to update**, the attributes you modify, each with its new value.
* Multi-value attributes take merge, replace or remove.

#### Delete Record

Remove a record from a stack.

* **Stack**, the stack you work in.
* **Record**, the record to delete, by ID or by variable.

#### Find Records

Search for records in a stack that match specific conditions.

* **Stack**, the stack you search.
* **Result limit**, either every matching record or a maximum number, with 1 as the minimum.
* **Filter rules**, the conditions from the rule builder that decide which records match.

Matching records become a variable for later actions.

#### Get Record

Retrieve a single record from a stack.

* **Stack**, the stack you work in.
* **Selection mode**, either a specific record ID or variable, or rules with a sort order.
* **Sort by**, used with rule-based selection. Pick the attribute and the direction, ascending or descending, which together decide the record you get back.

#### Aggregate Records

Compute metrics across records in a stack.

* **Stack**, the stack you work in.
* **Attribute**, the attribute you aggregate.
* **Filter rules**, an optional narrowing of which records count.
* **Metrics**, a wide range of calculations that follow the attribute's data type:
  * **Numbers:** count, sum, average, min, max, percentiles, standard deviation and more
  * **Text:** most frequent, least frequent, distinct count, empty count
  * **Dates:** earliest, latest, range and time-based metrics
  * **Booleans:** true count, false count, percentage true
