Help

Re: Random record selection from results after "Find Record" automation

Solved
Jump to Solution
3268 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Jonathon
4 - Data Explorer
4 - Data Explorer

Hello everyone! Thank you for taking the time to review my question.

I am using the Airtable “Find Record” automation feature to find records based on certain conditions. Once the feature finds multiple records, it selects the “Top” or “First” record that meets the condition criteria. I am trying to have it randomly select from the results, rather than default selecting the same record that was on top or first. Does anyone know the direction to look in or the process to make this possible?

Thank you kindly in advance!

1 Solution

Accepted Solutions
Justin_Barrett
18 - Pluto
18 - Pluto

Welcome to the community, @Jonathon! :grinning_face_with_big_eyes: Without using scripting, there’s no way to make a random selection from a collection of records. If your base is in a Pro-plan workspace or higher, you can use scripting actions in automations, and this would be doable with the help of JavaScript’s Math.random() method.

See Solution in Thread

5 Replies 5
Justin_Barrett
18 - Pluto
18 - Pluto

Welcome to the community, @Jonathon! :grinning_face_with_big_eyes: Without using scripting, there’s no way to make a random selection from a collection of records. If your base is in a Pro-plan workspace or higher, you can use scripting actions in automations, and this would be doable with the help of JavaScript’s Math.random() method.

Thank you! I am going to pursue that route and hopefully find success! I really appreciate your response

Welcome to the Airtable community!

What technique are you using to select the first record from the find results?

There are techniques for getting pseudo-random values by doing things like looking at the record ID, created time, or last modified time of a record. However, in this case, I believe that a scripting solution is probably best.

Thank you so much for your feedback! Right now, the results are sorted by I.D. number, but I am trying to have the results randomly selected with no value being a determining factor for selection (Other than the conditions it uses to narrow the selection.) I am looking into running a script today.
Thank you again for providing your information!

Webs
5 - Automation Enthusiast
5 - Automation Enthusiast

Does anyone have a code sample to use that would achieve the result?  This is something Im also interested in.