đź”— Glide Relation Basics

Hey all!

I’m releasing a mini series all about the Relation Column in Glide.

Before I create tutorials on more intermediate topics such as conditional relations, crafting matching values, or navigation and data generation via relations, we need to start from the beginning.

To kickstart the miniseries, here’s a tutorial on the basics of creating relations in Glide.

Wait...what's a Relation in Glide?

In Glide, a Relation is a column type that allows you to connect two sets of data. Typically, relations have a Parent-Child relationship. Just like children belong to their parents, often, certain data in your app “belongs” to another set of data.

In the video below, I use the idea of Topics and Lessons. Lessons belong to a Topic. I want to relate the Topics to their respective Lessons.

To relate (match) two sets of data, there needs to be an identical value in each data set. In the video below, I create and populate a “Topic” column in the Lessons table. Now, I can relate the matching data in the Topics table to the Lessons Table using this identical value.

Taking time to understand how your data tables will relate to one another will make app development infinitely easier.

Enjoy!

Also, if you’re brand new to Glide, make sure to check out the documentation:

15 Likes

Hi Robert!
Thanks for this video, we are just getting started with Glide and I was following your video on relations. For some reason I can’t get my relation column to show in Glide pages when I try to display it in a collection. The option doesn’t show, any advice on this?

Thanks!

Is your relation a single relation or a multiple relation?

Hi! Its a multiple relation.

Are you sure that you’re using the correct table as the source for the tab?

1 Like

I believe that I am, how can I know which is the correct table.

So I’ve switch table that the relation column was on and now it is showing as an option when I select the source however the actual group of items that are part of the relation isn’t showing only the topic name.

It’s showing some sort of a “Career Field” in your title. Check the “Items data” section on the right and adjust accordingly. Let us know if you have any further questions.

Thanks ThinhDinh, I actually was able to get it to show by switching the table and then added a lookup.

1 Like