# Documents from  Multiple Records

By default, Documint generates data based on an individual [record](https://support.airtable.com/hc/en-us/articles/360021333094-Getting-started-tables-records-and-fields#record) or row. But what if you need several records to display on your template? Here are the steps to achieve this result.<br>

1. Head over to Airtable and create a table that will group all your record items together. In this example, we will want to display all the names in the Dishes table along with each record's information like price, disclaimers, etc.<br>

![](https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FqAhqYe3TbXFAa7E3cHYL%2Fdocuments%20from%20multiple%20records%201.png?alt=media\&token=b82dd566-d417-4895-b8cc-48be19bf4fa3)

2\. Once you have a table ready to group these line items, create a linked record field. In this example, we decided to group all the line items in the Menu table.&#x20;

{% hint style="info" %} <mark style="background-color:blue;">**Documents will be generated from the Menu Table.**</mark>
{% endhint %}

![](https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FysgzLHCTJhJpRdBbrcSe%2Fdocuments%20from%20multiple%20records%202.png?alt=media\&token=914abfe0-1f3b-4635-8885-c418da0a01d3)

3\. Begin adding all the records you need to be displayed in the document.&#x20;

{% hint style="success" %}
See the [$filter](https://docs.documint.me/legacy-documentation/data-and-variables/functions#filter) function to filter items needed to be displayed.
{% endhint %}

![](https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FyPR1VBRGIpsgi2hgGpud%2Fdocuments%20from%20multiple%20records%203.png?alt=media\&token=d589d386-e664-40fc-9cec-45a5c1221f7d)

{% hint style="warning" %}
Remember to add the [Table ID](https://docs.documint.me/integrations/airtable/legacy-airtable-integration/expanding-linked-records) since it is a Linked Record.
{% endhint %}

![](https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FmPC3wheWCugtXCrbT0kX%2Fdocuments%20from%20multiple%20records%204.png?alt=media\&token=ecf6cea2-e028-46f8-86d6-0a9ec60d28ac)

4\. Add the [Generation Link](https://docs.documint.me/integrations/airtable/generation-link) or [Automation script](https://docs.documint.me/integrations/airtable/automation-script) to the new table created.&#x20;

![](https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2FVGFQhHMgDMdhBSCKTvSb%2Fdocuments%20from%20multiple%20records%205.png?alt=media\&token=44a1f255-6288-4297-8d43-d87b8108cf8d)

#### Documint Template Designer Page

5\. Create a Section with the number of elements you will need to create the line items. Select the section and "Edit Logic".&#x20;

{% hint style="info" %}
Adding a row to a section and then adding more columns will align variables better.
{% endhint %}

![](https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2Fhy87BdY4kuOcGNk9IRuB%2Fdocuments%20from%20multiple%20records%206.png?alt=media\&token=66987b94-8261-4582-9fa7-658881c404cb)

6\. In the Logic editor, select Repeat/Loop and add the name of the linked field created in the earlier steps. In our example, we will loop over the "Name" and "Price" fields from the "Dishes" table.

7\. Edit the template style as desired.&#x20;

8\. In Airtable, generate a document to see all your records! No more typing items from your database one by one!

![](https://1903534506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTY5wPd81K7B5rjyG5tjS%2Fuploads%2Ff8qgEGn8PgG5OZmVHCte%2Fdocuments%20from%20multiple%20records%208.png?alt=media\&token=c6c75c97-6117-48f0-8ff0-084160e7de8e)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.documint.me/integrations/airtable/legacy-airtable-integration/documents-from-multiple-records.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
