Select by in a widget based on an indirect link

Hi !

Firstly, love what you did with Grist, I’ve been on it for only a few days and already in love :slight_smile:

However, there’s something I haven’t figured out how to do : I want to display a table widget, but I want to select displayed records not by a direct field but by an indirect one.

Here’s my structure :
Events
Meals has a FK to Events
Recipes is linked to Meals through an association table recipe_per_meal (because I need additional columns of information)

Now, I’d like to display a table of my recipe_per_mal, not selected by current meal as suggested by the “select by” dropdown, but selected by current event (so, all the lines of my table recipe_per_meal that are linked to a meal itself linked to the selected event)

I tried with a formula column in my recipe_per_meal table, thiking I would then be able to select this formula column in the select by dropdown, but no success

Did I miss something ? Or is my approach wrong ?

Thanks a lot !!

Hi Sophie - I am looking into your message!

Hi @Sophie_Jobez.

Can you change your document so that Events has a Reference List column called Meals? I created a simple example here: Indirect Linking - Grist.

George

1 Like

Hi @georgegevoian and thanks for your time :slight_smile:

I’m really unsettled, I just tried doing that (with a formula column in event, because if I remove FK to event in meals I’ll lose possibility to dynamically create meals in the widget that are directly linked to the event) and it worked.

I’m pretty sure I had already tried that unsuccessfully before putting a, but I can’t find what I did differently this time Oo

Anyway, it’s working, thanks a lot, maybe you secretly telepathically drove me to do it right :laughing:

1 Like