Can formulas manipulate the file.name property while preserving its link functionality?

What I’m trying to do

I want to display shortened file names (in my case, removing the 'MFS - Instalment ’ prefix) while keeping the clickable link functionality. Or, alternatively, use the value in “Final Instalment Name/Number” as the Display property for the link from the file.name.

Things I have tried

I’ve created a Base using three properties:

  • file.name (a standard Obsidian property)
  • Fashion Plate Ref (this is a custom property that I have defined; it’s a link to a related file)
  • Final Instalment Name/Number (this is also a custom property that I have defined; it is just a text reference).

I’ve read through all the Bases documentation, particularly around Syntax and Functions.

I’ve tried a variety of variables, including replace and slice.

I’m not sure if they work on the file.name property.

Claude and I had an extensive conversation, trying to troubleshoot. After I told Claude that Bases exist (insert eye roll here), we walked through some troubleshooting scenarios.

[Note, I tried to include the link to the Claude convo, but wasn’t able to]

I’ve also uploaded a couple of screenshots of some of the errors. If it would be helpful, I can also share the various versions of my Base md file.

I’m not sure if I’m just thinking about this incorrectly? Or if what I want to do can’t be done via “file.name”? Thanks!!!


Use a formula with link():

link(file.path, file.name.slice(18))
1 Like

Schitts Creek Thank You GIF by CBC (1)