I’d like to dynamically be able to reference the name of the document I’m working in.
Right now, I can reference some properties of the document, like created/modified datetime, and who has modified/created it through e.g. thisDocument.Created()
It’d be nice if I could reference what the document is named through a function like: thisDocument.ToText()
That kind of works, thanks! Only that it doesn’t give the flexibility of not being formatted as a link.
The simplest solution is probably just to define a variable for the name once when you create the project, and then reuse that in everywhere in the template. Then the name only has to be changed in two spots: in the document name, and in the first variable.
.ToText() on references has unexpected behavior. As a user, I’d assume .ToText on a reference would return the name of the reference (for example, @SomeSection.ToText() should return the name of the section.) Instead, it returns a string that includes the Coda-internal reference information (for example,“SomeSection_suuGP”).
I would like to revive this request. It’s 2024 and I need this exact functionality:
I wish we could simply use thisDocument.PageName(), but “PageName expects parameter object to be a table, a control, or a canvas”. Let’s broaden the scope a tad!