JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Gallery
Randomizer Pack Demos
The Randomizer Pack
Time-Based Updates
Generate Rows
Shuffle Lists
Shuffle Column
More
Share
Explore
Generate Rows
Let’s say we want to generate 10 rows filled with unique random numbers.
Native Formula
Coda’s built-in random-number generator produces repeated numbers.
Fill Rows (Coda's Native Formula)
Randomizer Pack
We can fix this by basing the seed on
Now()
(so it’s different every time we press) and also the row number (so it’s different every row).
Fill Rows (Randomizer)
10 Random #'s
10 Random #'s
1
2
3
4
5
6
7
8
9
10
Result
Result
15
28
19
96
23
19
28
5
67
46
There are no rows in this table
Native Formula Button Code
RunActions(
DeleteRows([10 Random #'s]),
Sequence(1,10).FormulaMap(
AddRow(
[10 Random #'s],
[10 Random #'s].Result,
RandomInteger(1, 100, updateContinuously: true)
)
)
)
Randomizer Button Code
RunActions(
DeleteRows([10 Random #'s]),
Sequence(1,10).FormulaMap(
AddRow(
[10 Random #'s],
[10 Random #'s].Result,
Randomizer::RandomIntFromSeed(Now()+CurrentValue, 1, 100)
)
)
)
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.