# Creating lookups and rollups between tables

Stacker allows you to create lookup and roll-up fields directly within your app. This means you can pull together and summarise data from different data sources.

Lookups and Rollups each work over records which are linked by a relationship ("link to another record") field. So it only offers you tables where there is a valid relationship.

1. Click **Manage fields and data**
2. Click **Fields** > **+ Add field**
3. Enter a field name
4. Select the Lookup or Roll-up field type
5. Select the linked record field to use in the Lookup or Roll-up.
6. Select the field from the linked record that you want to look up or roll-up.
7. Click **Save**

![lookup\_fields.gif](https://support.stackerhq.com/hc/article_attachments/15481968706707)

You should now have the new field on your Data Grid.

**Tip**

We suggest choosing a name that clearly reflects the data that will be pulled in or summarised, e.g. 'Client Notes Lookup'.

### Lookup Field

A lookup field shows a specific field from a linked table. On our Properties app we have created a lookup field from our Clients table to our Team table. Instead of showing the Primary field, this allows you to choose any field to display.

![Screenshot\_2022-07-25\_at\_16.30.02.png](https://support.stackerhq.com/hc/article_attachments/8078967063443/Screenshot_2022-07-25_at_16.30.02.png)

### Roll-up Field

A roll-up field can display different results of a field based on related records.

Possible display options:

* Number of related records
* Count values...
* Sum...
* Average...
* Min...
* Max...

![CleanShot\_2023-04-04\_at\_13.02.53\_2x.png](https://support.stackerhq.com/hc/article_attachments/15481609845523)


---

# 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.stackerhq.com/stacker-classic/data/creating-lookups-and-rollups-between-tables.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.
