Dataview Inline shows as code on startup

What I’m trying to do

Apologies if this is an easy fix as I am new to Obsidian. I have both the homepage and dataview plugins, and I want a link on my home page that opens a new daily note in my “Daily Notes” folder. I found this command which works great:
="[[Daily Notes/" + dateformat(date(today), "yyyy-MM-dd") + "|Daily Note]]"

The only issue is that when I open the app (both on mobile and mac), it shows the code and not the link until I click on the page. Is there anything I can do to make it show just the link?
Let me know if this makes sense.

Things I have tried

I got the code from this forum page. Other than that I’ve tried searching for “Dataview inline code needs to be clicked before it works” and similar things.

I am not too experienced with DataView and I don’t use inline queries or the Homepage plugin but I know there some things to know about:

  • On startup, Dataview will index your files, so in the meantime rendering will not happen. So maybe try not to fall on the homepage straight away. Leave a tab open next to it when closing the app and close the tab a little time after startup.
  • I’m guessing you are not in source mode in the homepage page?
  • Automatic view refreshing in DataView settings: try enabling it if it is off.

There may be others, but that is all I could think of.
I do know from experience that when I paste in a DV or DVjs query in the editor, I need to cursor down or out of the code to have the query fire (my editor setting is always Live Preview; in Source Mode nothing happens).

Oh, this might be it if the thing is at the top of the note — the cursor may be there when you first open it.

Yeah, I thought about mentioning “add an empty line” after the one-liner but hard to know the outcome without actually trying it.
This case is different as the line is already there, but the firing might not start until after the indexing has been done. I do not know from where I’m sitting.

I tried adding a test file that opens on startup that only has a link to my Home file. With that I can open obsidian and click on Home and the link shows up just like I wanted! So this is a possible fix but it means an extra click every time I open the app. So not ideal but maybe if that’s my only option that’s what I’ll do.

You are correct I’m not in source mode so that isn’t the problem. Automatic view refreshing is turned on in my settings as well so that isn’t the issue either.

Thanks for the suggestions!

I tried both adding empty line and text above the code and the problem persists even when it’s further down so I don’t think it’s an issue with the cursor. It seems odd because clicking on the note and putting the cursor down somewhere other than the line of code causes it to immediately switch to a link so the cursor being there sounds like it could be the problem but when I put it further down I can see the cursor is on the first line of the note and not next to the code.

Thanks for the suggestion!

Here’s a screenshot of what it looks like on startup

This happened to me as well, and I found out I had accidently uninstalled Dataview when trying to uninstall another plugin. Reinstalling and enabling dataview & dataviewjs fixed it back to normal. In case it helps anyone else down the road…

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