Lookup Question

Hi

I am using the Row Id in the relation between Supplier and Trade Accounts. How do I pass a Supplier column such as name down into the Trade Account Data Grid related View? The lookup seems to work the other way

If you want the Supplier Name in the Trade Accounts list, then you need a single relation from Trade to Supplier, followed by a Lookup column that retrieves the supplier name from the relation.

2 Likes

Thanks @Jeff_Hager. I have it working. Seems strange to have two relationships setup (one in each direction)

What do you mean by “one in each direction”? If you need the info to show up in the Trade Accounts table, you need to have the relation from that table to the Supplier table only to do the lookup.

1 Like

@ThinhDinh I may have this wrong but I have a 1 -to-many relationship setup. 1 Supplier can have many Trade Accounts but via this I couldn’t get the Supplier Name?

If you do a lookup through a multiple relation, the returned result will be an array.

But, wouldn’t you already have the Supplier Name in the Suppliers table?

If I understand what you want, then I think you’re creating this relation in the wrong table. It sounds like you need to create a single relation from your Trade Accounts table to your Suppliers table, and then use a lookup column through that relation to get the Supplier name for each Trade Account.

Does that make sense?

PS. Which is exactly what @Jeff_Hager suggested that you do in his initial reply :wink:

2 Likes

Hi @Darren_Murphy yeah I did what @Jeff_Hager suggested but I need to have a play around as the relationship setup on Glide is different to what I am used to. Some of the guides are a little off point as they mention passing names instead of Row Id which could lead to a world of pain. Appreciate the input from y’all :slight_smile:

1 Like

Yes, generally passing rowIDs is considered to be the best practice. Don’t pass things that can be changed later, and even worse, things that can not be unique, like names.