Hi all!
Has anyone tried (or better: succeeded) in using a section name in a formula?
Ideally, I want the filter and name of the view to always be equal to the name of the section… But the latter I think is not possible, about the former one I am not sure
1 Like
Hey @Philipp_Alexander_Asbrand-Eickhoff great question! @jakobheuser posted a bit about this topic in this thread. Since there is no way to get the section name using a variable, there is a bit of a hack you can use to get the name yourself to be used for a filter, view name, etc. The hack involves creating a table with one column being the full link to the section and the 2nd column with the following formula:
=thisRow.ToText().Split("/").nth(6).RegexReplace("_.*","" )
This formula uses regex to tease out just the section name which you can reference in the canvas. In this case, I reference “Bugs-Experiment” by writing =@[Bugs/Experiment].Stub
to get just the text “Bugs-Experiment” in the canvas. You can then assign a variable name to this calculation (in my case I named the calc myFilter). You can then reference myFilter anywhere in your doc!
4 Likes
Thanks for the fast reply @Al_Chen_Coda - do you guys never get a day off?!
It works well apart from (and that is just the nature of the little hack) when I replicate the doc, it will of course again not work again as it will always reference the original doc.
Do you happen to have a quick answer for the second part of my question? It is so far not possible to use a formula as a header for a view (or table), correct?
Thanks and good night from Germany!
1 Like
I am super passionate about solving issues in Coda for our users, so I guess you could say there is no such thing as a day off for me . You are correct, you would have to build a brand new table like the one I created in my example for each new doc you create. Regarding your second question, yes you currently cannot use a formula as a header for a view or table. Have a good night!
1 Like