Help

Re: Selecting a random row/record in a table and displaying results

3264 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Manuel_Maccou
4 - Data Explorer
4 - Data Explorer

I’ve seen this question asked a few times but still no solution. I would like to use airtable as the database for my trivia app. I need a way to randomly select row/record which will have the question, and then display the contents. The part I havent seen a solution to yet is how to select a random row/record from only the populated rows. Any ideas?

2 Replies 2

Here is one possible method:

  1. Create a new field for a random value.
  2. Set the random value either using the Batch update block or Scripting block.
  3. Sort according to the random value field and take the first record in the view.

You might love using Airtable’s Flashcard Block. It randomly goes through your records and does exactly what you have requested — it randomly pulls the questions & answers from your base.