Reference currently selected card in a formula

Hi,
Can I start with professing my undying love for this product.
It’s so slick. I’ve been able to build a shell of a decent app very quickly, way quicker than by any other method.

Anyway, my first doc has 4 tables for task management.
I’ve created a home page with a selector for the base table called Goals.
I can filter the 2nd table which is called Ideas based on the goal that’s selected.
The Ideas are listed as cards.
I’ve another table called Tasks, each task is linked to the Ideas table.
I’d love to be able to filter the Tasks list based on the currently selected card in the Ideas table.
Is this possible?

Adrian C.

2 Likes

Love the scenario. Two things to suggest:

  1. Use layouts - See more here. They were built for relational drilldown views like this. Just create a lookup from Ideas to Tasks and then in the Layout editor, you can select to show it as a subtable.
  2. Add a IsSelected checkbox column in the Ideas table, and then add a button column to Select the row. When you press that button, have it clear the rest of the IsSelected column and then set thisRow.IsSelected to true. Then you can use that to filter / calculate anything else.

Happy to build out a little example for you if you want?

2 Likes

Dear @shishir,

Would be great to have a basic template on what Coda users can build on :bulb::sparkles:

Thanks for your kind support,
//JP

That would be fantastic if you could.

Sure, here’s an example:

2 Likes

Dear Shishir,

Thanks a lot sharing this.
For me, I wasn’t aware of the “RunActions” formula, that opens interesting use cases.

Further more, I would really appreciate to have in the formula list some links to use cases where the concerning formula is used. Education by example is a strong tool. :sparkles:

I am sure many other users will benefit from this post :heart_eyes:

Amicable,
//JP

Hi Shishir,
Many thanks for that.
Can I ask one question?
How did you add the Ideas table to the Goals card in the layout approach?
I can click on the pen to open it in edit mode, but I can’t find out how to do this.
Noob…

Hi @anon41778551,

@shishir has created a formulaic column called Ideas on Goals Table with following formula [Ideas Table].Lookup(Goal, thisRow) - this pulls out all Ideas related to current Goal. Once you put a column like this, you could switch the layout to Detail and click on Pencil on top right corner. this will put it in design mode. Once in design mode, you can toggle the cell to display it as a table.

here’s a gif that shows how to do it.

Thanks.

2 Likes

Hi @shishir

Sorry for taking so long to get back to you, but that is amazing.
Many thanks for that

1 Like