Generate Random Numbers In Notion (New Function)
A New Formula Function?
It looks like the id() function grabs the unique ID given to each notion page and returns it into a formula result. The possibilities are incredible!
How To Generate A Random Number
With the addition of every new database entry, and a formula property with one or more of the formulas below, a new random number or letter will appear.
1- … Random Number Combinations
Random Number From 1-10
round(toNumber(replaceAll(id(), "[^0-9]", "")) % 90 / 10) + 1
Random Number From 1-100
round(toNumber(replaceAll(id(), "[^0-9]", "")) % 900 / 10) + 1
Random Number From 1-6 (dice roll)
round(toNumber(replaceAll(id(), "[^0-9]", "")) % 50 / 10) + 1
0- … Random Number Combinations
Random Number From 0-9
round(toNumber(replaceAll(id(), "[^0-9]", "")) % 90 / 10)
Random Number From 0-99
round(toNumber(replaceAll(id(), "[^0-9]", "")) % 990 / 10)
Binary And Letter Combinations
Random Number From 0-1
round(toNumber(replaceAll(id(), "[^0-9]", "")) % 10 / 10)
Random Number From 0-1 (Coin Flip)
if(round(toNumber(replaceAll(id(), "[^0-9]", "")) % 10 / 10) == 0, "Heads", "Tails")
Random Number From 0-1 (True/False)
if(round(toNumber(replaceAll(id(), "[^0-9]", "")) % 10 / 10) == 0, false, true)