Link local files in bases with formula

What I’m trying to do

I want to use a bases formula that creates a link pointing to a local file on my computer.

Things I have tried

I know that the following works:

  1. In my notes I use external links. Either of the following syntaxes works there:

    [Link](file:///Users/xyz/Downloads/Filename%20With%20Spaces)
    [Link](<file:///Users/xyz/Downloads/Filename With Spaces>)
    
  2. When I add the value "file:///Users/xyz/Downloads/Filename%20With%20Spaces" to my “LinkToFile” property and display this property in my base, it appears as an external link and correctly opens the file.

However, if I now use a formula to generate the same string ("file:///Users/xyz/Downloads/" + "Filename%20With%20Spaces"), it is only shown as plain text. When I apply the link() function to this string, it displays as an external link, but it doesn’t open the file. I also tried using the external-link syntax that works in my notes, but it didn’t work in this case either.

What am I missing?

It’s not you. It’s Bases.

Seems related: In .base files, local URIs in formulas do not open

Back then, however, the formula versions worked when the base was embedded (code block or link embed) but didn’t work directly in the .base file. A few people confirmed, and the team repro-ed.

But testing anew in the latest release, I think the formula versions work in neither context. That is, it no longer works in embedded contexts.

Thank you very much for your response and providing the link to your bug report.

I used this “forcearound” on Windows:

Thanks for sharing.
In another post, someone recommended a good workaround for me that might also work for you.

1 Like

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