Links
The Links field type is deprecated. New link fields are created as Link to Another Record fields. Existing Links fields can be upgraded to the new format.
Use the Links field type to make relationships between tables and to link records in other tables.
NocoDB supports these types of relations:
| Relation | What it does | Example |
|---|---|---|
Has-Many | A record in one table can have many records in another table. | A Country can have many Cities. |
Belongs-to | Many records in one table can have one record in another table. | A City Belongs-to a Country. |
Many-to-Many | Many records in one table can have many records in another table. | A Student can have many Subjects, and a Subject can have many Students. |
Copy a prompt, paste it into NocoAI in any base, and replace the words in [brackets] with your own.
- Link [Orders] to [Customers] so each order belongs to one customer
- Link [Projects] and [People] so a project can have many people and a person many projects
- Link every record in [Orders] to the [Customers] record with the same [Email]
- Show me the [orders] linked to this [customer]
Create a link field
- Click the
+icon to the right of theFields header. - In the dropdown modal, enter the field name (optional).
- In the dropdown, select the field type
Links. - Select the relation type:
One-to-one,Has-ManyorMany-to-Many. - Select the table to link to.
- Advanced settings (optional): configure the label that the cell shows. The defaults are
LinkandLinks. - Click the
Save Fieldbutton.

You can limit the records that you can select in the Link records modal. Read more
Cell display
The cell shows the number of links from the record to the related table.

Click the link text. The Linked Records modal opens. It shows the list of links and more information about them.
List linked records

The list of linked records shows as a dropdown, with each linked record as a card. The modal has these parts:
- Search bar: use it to filter the list of linked records.
- Icon: shows a
Many-to-Manyrelation. The count shows the number of linked records. - List (cards) of linked records.
<>icon: to see more information (expanded record), hover on the card and click the<>icon.-icon: click it to unlink the record.+ New recordbutton: click it to create a new record and link it to the current record.Link more records: click it to link an existing record. Read more- Pagination bar.
Link new records
To open the modal to add new links, do one of these:
- Click the
+ Link more Recordsbutton in theLinked Recordsmodal. - Click the cell, then click the
+icon in the cell.

The modal has these parts:
- Search bar: use it to filter the list of records.
- Icon: shows a
Many-to-Manyrelation. The count shows the number of linked records. - List (cards) of records that you can link.
<>icon: to see more information (expanded record) before you link, hover on the card and click the<>icon.+icon: click it to link the record.+ New recordbutton: click it to create a new record and link it to the current record.- Pagination bar.
Unlink records
To unlink a record, open the Linked Records modal. Then click the - icon on the card of the record.
Limit record selection
Limit record selection sets which records you can select in the Link records modal of a Links field. It has two modes:
- Limit by view
- Limit by filter ☁
Notes:
- You can use the two modes together. If you use both, you can select only the records that satisfy all conditions (the intersection).
- This feature changes only the records that you can select. It does not change the existing links.
- The limit applies only to the Link records modal. It does not stop link changes through the API, copy-paste or other methods.
- The Limit by filter option is available on NocoDB Cloud (Plus plan and above) and licensed self-hosted deployments (Business plan and above).
If you configure no view under Limit by view, the Link records modal shows all records from the related table. NocoDB does not apply the filters of the default view of the related table, so you can select every record. NocoDB still uses the sort order of the default view to order the list. Record-level security rules always apply.
Limit by view
To limit the records that you can select to the records in a view, do these steps:
Steps
- Turn on
Limit record selection to view. - In the dropdown, select the view.
- Click the
Save Fieldbutton.

In the example image above, you can select only the records in the Trailers view.
Notes:
- You can select only one view.
- If you delete the view that the links field uses, NocoDB turns off the limit by view option.
- If you change the filters in the view, the records that you can select during linking also change.
Limit by filter ☁
To limit the records that you can select with filters, do these steps:
Steps
- Turn on
Limit record selection by filter. - Configure the filter:
- Click the
Add filterbutton. - Select the field and the operator.
- Configure the value.
- Click the
Save Fieldbutton.

In the example image above, you can select only the records in the Trailers view where rating is PG.
Notes:
- You can add multiple filters.
- If you delete a field that a filter of the links field uses, NocoDB turns off the related filters.
Filter Type
A condition in the filter can be one of two types:
| Type | Filter value |
|---|---|
| Static condition | A constant value. |
| Dynamic condition | A field value from the current record. |
To change a filter value between static and dynamic, use the ⚙️ icon to the right of the filter.

A filter can have both static and dynamic conditions.
A dynamic condition can also compare linked records. Use it when the filter field is a Link field in the linked table, or a Lookup that ends in one. You then compare that field to a Link field on the current record. Both fields must point at the same table. The condition matches a record when the two fields share a minimum of one linked record. Its opposite matches when they share none.
NocoDB compares the linked records themselves, not their display values. Only the equality operators are available for this comparison.
Good to know
- You can link only tables in the same database.
- NocoDB supports self-referencing links (links to the same table).
- For each
Has-Manyrelation, NocoDB automatically adds aBelongs-torelationship field to the adjacent table.
Related
Last updated on