Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here
Feb 18, 2022
I have a field that is called Assigned to and it is a single select. It has for example 4 values. When a record is added, I want it to randomly select one of the 4 options and update the record.
Feb 19, 2022
The Batch Update app lets you randomly assign a value, but it can’t be automated in any way. You would have to manually run it every time you want to assign value(s):
Feb 19, 2022
Welcome to the Airtable community!
If records are not created in bulk at the same time, you can do this without scripting.
Get a random value between 0-59 by looking at the seconds of the created time of the record. Convert this random number to a random choice using nested if functions.
SECOND( CREATED_TIME() ) < 15,
SECOND( CREATED_TIME() ) < 30,
SECOND( CREATED_TIME() ) < 45,
Or you could use a formula field that uses MOD and SWITCH for the same result.
SECOND( CREATED_TIME() ),
0, "Choice 1",
1, "Choice 2",
2, "Choice 3",
3, "Choice 4"
If the value does not need to be edited later, you are done. If the value needs to be editable, add an automation that copies the formula result to an editable field.