Relation columns play a very important role in connecting data across your sheets.
With a relation column, you can link records from one table or sheet to another, provided that the two tables/sheets share a common data.
In the app above 👆🏼we have four tables, and two of these tables, Items and Brands, share a common data.
Items contains information about all the items in the store, including the brand name of each item.
Brands contains information about the specific brands carried by the store.
Because both tables share the information about the brand name, we can link these two tabs in a relation.
With a relation column you can create two types of relation;
A single relation
A multiple relation
When a relation column returns a single value for each cell, we refer to this as a single relation.
To create a single relation, go to the data editor and create a new column. Choose “relation column”and configure the column to match your data.
To display a single relation in your app, use the Relation Component.
When a relation column returns multiple values for each cell, we refer to this as a multiple relation. For example, you could create a multiple relation that allowed you to see all employees that worked in a particular location or all recipes in a particular category.
To do this, go to your data editor and create a relation column. This time, also turn on the 'match multiple' setting to make sure that the column will return more than one entry.
In the example below, we used an Inline List to display the "Products" relation column, which lists down all the products in the store that fall under the specific brand.