Writing to Relation field from Choice

Hi there,

Would appreciate any help on this!

In my Edit screen, I’m trying to edit a record from a grant proposal Details record. I can use a Choice component to find records from the Funder table.

However, why am I unable to see my Relation field in Grant Proposals to Write Back to it?


I’m not sure I understand. If you are editing the Grant Proposal, what’s the purpose of writing a value back through the relation? Shouldn’t you be writing it to a column in the Grant Proposal table, such as the Funder ID?

Which table is your last screenshot showing?

To ensure the link between the Proposal and the Funder.

So, should I have a hidden field writing back to the Funder ID?

That table showing is from the Grant Proposals table.

Your choice component should be set up with the ‘Values’ setting pointing to the RowID column of the Funder, and the ‘Display as’ setting pointing to the funder name. The goal is to have your choice component show the names, but write the ID to the table.

The relation should just pick up the chosen funder and link up accordingly. I’m still confused because the ‘Write To’ setting in the choice component doesn’t show the fdn name column in the table in your screenshot. So either you are not editing a Grant Proposal record, or you are showing the wrong table in your screenshot.

I still don’t understand why you need to write anything through a relation. When you change a chosen value, any relation that uses that choice will update accordingly.

I think I’m missing some context with your currently setup.

1 Like

Ah, ok I had my Values as the Funder name instead of Row ID, so that would fix part of it.

yeah none of my relations show in the Write to.

I’m coming from Airtable where auto-linking just happens. You choose or create your linked record aka Relation in Glide and it links. Additionally, linked record columns are automatically created in both tables to show the link. I think that’s part of what’s throwing me off. I’m having to create 2 relations tables instead of just 1. My Relations right now don’t “match”

Here’s a video (before I figured out the Values part)

Relations are similar to Linked Records, but there are important differences.

Linked records in Airtable can act like a column that holds a value as well as acts like a relation. Think of it like a single column that takes the place of two separate columns in Glide.

To form a relation in Glide though, you need to specify a column in one table and connect it to a column in another table that would contain and exact match. That is what forms a relation. You don’t necessarily need a relation in each table. Sometimes you do, but lets just say that it’s not a requirement to form a relation.

Also, it should be noted that a relation is a link to an entire row or series of rows. The values that you see in a relation column have no bearing regarding the contents. Just the fact that you see anything in a relation column is confirmation that the relation was formed. Glide just picks a column value to show for reference. To pull specific columns out of those related rows, then you need to use a Lookup column.

If I’m understanding your setup correctly though, when you select a funder, it will write the rowID of the funder to the FunderID column in the Grants table. Then the relation in the Grants table should link the FunderID column to the RowID column in the Funders table.

2 Likes

Ah ok that makes more sense. Thank you for the explanation. I’m just so used to linked record columns/fields.

"If I’m understanding your setup correctly though, when you select a funder, it will write the rowID of the funder to the FunderID column in the Grants table.

Yes that’s correct.

Then the relation in the Grants table should link the FunderID column to the RowID column in the Funders table."

Yes this is correct.

Should I have even have Relations in both?

That depends. It doesn’t hurt to have it on both ends. The relation from Grants to Funders makes sense if you want to use Lookup columns to pull additional information about the related Funder into the Grant table. The relation from Funder to Grants makes sense if you want to display a collection of related Grants when viewing a Funder.

1 Like

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