Templater code for filename most recently modified

Things I have tried

Searched a lot

What I’m trying to do

Get templater to spit out the name of the file from which a new file was just created.
(In order to create a hard backlink)

I can get it to use this:

` # [[<% tp.file.title%>]]

To insert the title of the newly made file as a header.

But how do I get templater to find the file name from which the link was followed.

I suspect if there’s a way to get the filename of the most recently edited file, that would work. However, when I look into templater commands regarding modification date it always seems to be related to the current file, not the previous file.

The only scenario where that might not work would be if the link to a non-existence file was written previously and now you’re just navigating to the file to tap-/click-create the new file

Any suggestions?

I did try this, but got an error on my mobile and can’t read the error as I think the console is only available on desktop versions of Obsidian

the solution is here:

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