Can't see relation in single item view

I’m pretty sure I’m missing something basic here. I have a tasks table and a status table, and I’m relating task statuses with statusIDs (row IDs), which appear as the status name in the Task table. For the collection, the status relation can be selected as one of the columns, so it shows the status name not the status ID. But when I click on the individual tasks, I can’t select the status relation column as a field, so it’s just showing the statusID. What am I missing?

You can’t use a relation column in a fields component . Assuming the relation is a single relation, what you probably want is a lookup column that fetches the value you need via the relation.

Thanks for the quick response. So I effectively have the status data duplicated 3 times now? This surely isn’t right…

CleanShot 2024-08-20 at 17.45.34

It’s almost right.
Looks like your relation is a multiple relation, which means that your lookup is returning an array (you can tell it’s an array because of the bubble around the value), so you still won’t be able to use it in the Fields component.

You need to do one of two things:

  • If you only expect the relation to ever match one row, then you should change it to a single relation. Then you will be able to use the lookup.
  • If the relation could match multiple rows, then instead of using a lookup you should use a single value column.

I know it seems a bit convoluted, but this is how Glide works. Essentially what you are looking for/expecting is what we refer to as an Inline Lookup. This is not something that Glide supports, unfortunately. Maybe one day…

1 Like

Yes that’s right, I was seeing if making it multiple would solve the issue. Will revert that back. We will eventually move over to Postgres (via Supabase) but wanted to build out the core UI with Glide tables - so I’m effectively trying to replicate the relational DB (foreign key <> primary key) in Glide. I imagine there was a good reason it was built like this…

It’s a long term feature request - see below.

Glide have indicated that they would like to do it, but I get the impression that it’s not a high priority.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.