Make formula in a field specific to a view of a table

  • I have a tasks table, with many views, and one of the fields is sub-tasks (which links to the sub-tasks table)
  • I filter the sub-tasks field based on the values from filters on the main tasks page.
  • But for other views of the tasks table I would then like to filter the sub-tasks field differently.
  • But I cannot find a way to reference just the table view (or page) in a formula, any ideas?

Thanks

If I understand correctly what you are trying to do, you should refer to the views filter(s) if you want to get the same rows that the view has.

If you want the same columns, you would use a layout associated with the view.

I later night answer, hope it makes sense.

Hi @Piet_Strydom

Thanks for the answer - So the view filter wonā€™t work for this because the view filter is filtering the rows of that view of the given table (in this case the ā€˜tasksā€™ table).
What I am needing to do is filter the ā€˜sub-tasksā€™ table (which displays rows from that ā€˜sub-taskā€™ table in the sub-task field in the ā€˜taskā€™ table) formulaically in a relation field depending on which view of the ā€˜tasksā€™ table is in question.

So I was hopeful with the ā€œThisTableā€ and ā€œIsFromTableā€ functions, but they only work with the master versions of a table and do not recognize views thereof.

So I guess in summary, Iā€™m looking for a way to formulaically recognize the view of a table and then take an action based on that.

Hi Evan,

Unfortunately I struggle to follow the abstract that you are explaining.

Is it possible to share a doc with an outline of what you are trying to do in business terms?
What is the formula supposed to achieve?

Regards
Piet

Hi @Piet_Strydom

Really appreciate your input, thanks.

Hereā€™s a quick video explaining what Iā€™m trying to do,

Thanks again for looking into this.

HI Evan,

Thanks for the explanation, that helped a lot to understand. And that is some next level filtering you have there.

I am not aware of any formula that will allow you to get metadata about a table or view.

But from your explanation, it sounded as if these new views that are getting created, would be user specific. If they are, then you could put that filter formula inside a switchIf(user=xxx, ).

HOWEVER, this will influence all tables for the user in the document, not just the specific view. But this might make things easier, you do not have to have additional views, just a user-specific filter formula for the sub-tasks.

The however also applies to any other selection you use - I tried using a select control on the page where the view is, but that is going to apply to all views. The only solution would come when/ if Coda adds a this Page/ thisView to thisTable and thisRow.

Hey Piet

Thank you for reviewing that, and I appreciate your out the box thinking of switchifā€™ing based on a user, although it wouldnā€™t really do the job here as the same user would want to see that field (sub-tasks) displaying differently based on the view theyā€™re looking at.

I am kinda baffled as to why there isnā€™t a ā€˜ispageā€™ or ā€˜isview/tableā€™ function as I can imagine quite a few use cases for it and I canā€™t immediately see why it would be computationally onerous (not that Iā€™m a dev!)ā€¦then again maybe most people arenā€™t creating such generalized docs which then require detailed personalization (but for tasks that seems like a use case most would want, i.e. never siloing your work management).

1 Like

Itā€™s a pleasure!

There is quite a bit of demand for something like thisPage.

But a lot of people are asking for a lot of thingsā€¦ :wink:

1 Like

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