Get title of current widget in formular

Is there a way to get the current widget title in a formular?

The reason i want to do this is,
i have two views of the same table named: “S1”, “S2”.
They have different columns hidden.

When an entry is added in the view S1 i want to have a cell contain the string “S1”,
same as with S2.

Hi @enthus1ast, formulas currently operate on tabular data, and don’t know about how the data is presented or viewed. We have been adding more context that can be used from trigger formulas, such as which user is making a change for example. In principle we could add some information to that context specifying where in the layout the change is being made, and your question makes me realize that could be useful. But in the meantime, no, the current widget title is not available in formulas.

There is a somewhat ugly workaround possible, see Selector hack - Grist. What you can do is add a reference column, and then have one of your widgets linked to a 1-record filtered widget with exactly what you want to insert for that view, and similarly for the other widget. The reference column will get populated in a sensible way when entries are added.

It is annoying to have extra useless widgets. In the demo I made them as small as possible, and there’s a feature coming soon where you’ll be able to collapse widgets into a kind of button bar.

1 Like