There are so many reasons why you might need to generate a random number in Notion. You might want to display a “Movies to watch next” list and present the movies in a random order. Or you might want to display random quotes from a database. Whatever your reason might be, here is a solution.
substring(format(toNumber(substring(format(timestamp(now())), 8, 9) + substring(format(timestamp(now())), 1, 2) + substring(format(timestamp(now())), 7, 8)) * toNumber(prop("Rand Datetime"))), 8, 11)
We solve Notion’s no rand()
problem by using numbers extracted from a now()
timestamp in chaotic order, then multiplied by another random datetime and extracted numbers again.
“Rand Datetime” is just a random date that you supply rather than using “Created Date” or “Edited Date”. It keeps each random value completely unique.
To use, apply this formula to a column in your database, then sort by that column.
DUPLICATE NOTION TEMPLATE