LogoFLO.W
  • Pricing
  • Blog
  • Docs
  • Thinking
  • About
Get Started
  • Requirements
  • Create a Quotes Database and Add Random Sorting
  • Create a Display Database with Relation
  • Use a Formula to Randomly Pick a Quote
  • Final Result
Notion 问答·
2024/09/15

How to Create a Random Quotes Display with Notion Database

Use a Notion database combined with Formula functions to display random quotes, showing a different quote each time you refresh the page.

avatar for 二一
二一
How to Create a Random Quotes Display with Notion Database

This question comes from a reader of the Notion course. It has been organized and shared here. If you encounter similar issues while using Notion, feel free to leave a comment.

Requirements

The goal is to randomly display any quote from a "Quotes Database," showing a different quote each time the page is refreshed, with the selection being truly random.

The solution requires combining two previously solved problems:

  1. How to implement random sorting in Notion
  2. How to display only the last updated entry in a Notion database

Create a Quotes Database and Add Random Sorting

First, create a database to store your quotes, add an ID field, then use a Formula to randomly sort the ID field:

mod(mod(Last Edited Time.timestamp()/ID.toNumber() * 1.00011979e+8 + 5.00067713e+8, 9.00066731e+8) * mod(timestamp(now()) * 8.00067089e+8 + 8.00068411e+8, 8.00053967e+8) + 9.00067309e+8, 9.00066571e+8)

Random sorting in the Quotes Database

Create a Display Database with Relation

Next, create a database for displaying random quotes and set up a Relation to link it with every entry in the "Quotes Database":

Relation to the Quotes Database

Use a Formula to Randomly Pick a Quote

Finally, use a Formula to randomly pick one quote to display:

语录数据库.map(current.随机排序).sort().slice(0,1).map(lets( rank1,current, quote,语录数据库.find(current.随机排序==rank1),quote ))

Final Result

Here is the effect of displaying random quotes in a Gallery View:

Gallery View effect

After refreshing:

Effect after refreshing

Note that due to Notion's database performance limitations, there may be some loading delay when refreshing.


📘 FLO.W — Notion Personal Management System

FLO.W is a Notion-based personal management template that integrates tasks, notes, projects, habits, and more, complete with comprehensive tutorials.

Ready-to-use Notion template system
Complete tutorials included, beginner-friendly
Continuously updated and maintained
Learn About FLO.W Template✨ 1237+ users chose FLO.W
2024/09/15
Share this post
All Posts

More Posts

How to Resize and Left-Align Images in Notion?
#Notion 问答

How to Resize and Left-Align Images in Notion?

A detailed guide on resizing and left-aligning images in Notion, including how to drag to adjust size and use the alignment buttons.

2024/12/26
What to Do When Notion Database Nesting Is Too Deep
#Notion 问答

What to Do When Notion Database Nesting Is Too Deep

Struggling with deeply nested Notion databases? This article explains how to control nesting depth using the PARA methodology, and how to create a Desk shortcut page to quickly access deeply nested content.

2024/11/15
How to Build a Global Navigation Bar with Synced Blocks in Notion
#Notion 问答

How to Build a Global Navigation Bar with Synced Blocks in Notion

A step-by-step guide to building a global navigation bar using Notion Synced Blocks, enabling one-click cross-page navigation menus.

2025/02/01

Newsletter

Join the community

Subscribe to our newsletter for the latest news and updates

LogoFLO.W
TwitterX (Twitter)YouTubeYouTubeBilibiliXiaoHongShuEmail
Product
  • Features
  • Pricing
  • FAQ
Resources
  • Blog
  • Documentation
  • Notion Custom Agent
Company
  • About
  • Contact
Legal
  • Cookie Policy
  • Privacy Policy
  • Terms of Service

Subscribe for more Notion tips and updates

© 2026 FLO.W, All rights reservedNotion is a trademark of Notion Labs, Inc. This is an independent third-party site, not affiliated with or endorsed by Notion.
Featured on Uneed