Skip to content

icon picker
Shuffle Column

You can shuffle a column by loading the values in, shuffling them, and writing them back to the table. Here it is shuffled by a column formula, and by a button.
Shuffle Rows!
Shuffle Time!
0
Fruit
Shuffled by Formula
Shuffled by Button
1
Apple
Grapefruit
Huckleberry
2
Banana
Huckleberry
Elderberry
3
Cherry
Banana
Fig
4
Elderberry
Fig
Cherry
5
Fig
Apple
Grapefruit
6
Grapefruit
Elderberry
Apple
7
Huckleberry
Cherry
Banana
There are no rows in this table

Shuffled by Formula

[Shuffle Time!].Fruit.ShuffleText()
.WithName(
ShuffledList,
ShuffledList.Nth(
thisRow.RowId()
)
)
Get the Shuffle Time table’s Fruit column
Shuffle the values in that list
Store that under the name ShuffledList for now, using
Go through that ShuffledList, and grab one of the values with . Which value? Whatever row we’re on (so if we’re on row 5, thisRow.RowId() will be 5, and we’ll grab the 5th value from the shuffled list)

Shuffled by Button

[Shuffle Time!].Fruit
.ShuffleText(Now())
.WithName(
ShuffledList,
[Shuffle Time!].FormulaMap(
ModifyRows(
CurrentValue,
[Shuffled by Button],
ShuffledList.Nth(
CurrentValue.RowId()
)
)
)
)
Get the Shuffle Time table’s Fruit column
Shuffle the values in that list, with a seed of Now() (so it’s different every time we press the button)
Store that under the name ShuffledList for now, using
Go through every row in the Shuffle Time table, and do the following to each... ()
Modify the current row we’re on
Modify the Shuffled by Button column
Go through that ShuffledList, and grab one of the values with . Which value? Whatever row we’re on (so if we’re on row 5, thisRow.RowId() will be 5, and we’ll grab the 5th value from the shuffled list)

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.