Dataview - Pulling in random string (quote) from a database (note)


Basically, I am looking to build a list of quotes or motivational snippets into a note. I want to pull a block from this note, at random, to post into a template.

I am in unfamiliar territory with Obsidian, not being someone with a coding background other than some very basic C++ knowledge.

I don’t know how to do this, but I know enough to know this has got to be possible. I just don’t know any JS syntax or if a random generated query would work with blocks in Obsidian.

If someone could give me a nudge in the right direction, please help!

Thank you!

I use

For this purpose.

I have a note with each quote separated by new lines and my template just uses an inline call to dice: [[note]]. Works well for me, plus I can “roll” again and get a fresh quote.

1 Like

I think you could accomplish this with a plugin called Spotlight.

This would be randomly obtained every time the page is loaded.

It lets you set up folder or tags, from which to randomly pull to display elsewhere. I think you can search by heading too.

If I remember right you set it up in plugin settings, then all you need to display it was an empty block like this:



I did see spotlight and tried it. I could not get it to work–figured id search for a my comprehensive solution.

Dice Roll worked perfect and was easy to figure out. Thank you.

1 Like

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