How to find a random record

I’m looking to create a button where everytime I click on it it will locate the data set and output a random value from it (similar to a lottery draw where I draw 10 tickets out of 1000 matching submissions)

I have tried looking for answers everywhere but nothing seems to be a solution. Hoping someone can help. Thanks in advance

Here’s an approach I have used.

  1. In an airtable table, add a field called order of type Number.
  2. Write an airtable automation that goes through all the records in the table and sets the order field to a random number.
  3. Set that automation to run every 15 mins.
  4. In Softr, add a list or list details block that pulls the first record from that table, sorted by the order field.

Main caveat is that you won’t get a different random record on every reload of the page. And I don’t think you can make the automation run more often.

1 Like