Ability to reference name of document within the document

#1

Hey!

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()

or simply:
documentName

1 Like
#2

Would this workaround work for you? Basically using the doc url? Or do you want to do more with this?

#3

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.

#4

This doesn’t work in other places you’d want to use the document name.

For example, with automation that sends a GMail message, I’d like the subject to be something like

= "Open tasks from " + thisDocument.name

so it stands out in the mailbox.