Random row from a table

Hi folks,

I’d like to create a formula that selects a random row from a table named Questions and displays it in the VIEW Question table. The Questions table contains the following columns: Category (text), Questions (text), Number (index row number), and I’d like a random row selected containing only the Category and Questions columns. I’d like the randomization to be based on a condition, specifically on a randomly selected time within a time interval.

Could you please advice me?
Thanks in advance.

Hi @Alexandru_Grigoras,

is your issue already solved? If no, please check your embed, so I can access your doc.

Jannis

Hello Jannis,

Still having issues. I attached the doc here.

I’d like to create a formula that selects a random row from a table named Questions and displays it in the VIEW Question table. The Questions table contains the following columns: Category (text), Questions (text), Number (index row number), and I’d like a random row selected containing only the Category and Questions columns. I’d like the randomization to be based on a condition, specifically on a randomly selected time within a time interval.

Also, I would like that when I submit the answer in the Answers table, the question that is displayed at the top is also saved in the Question column.

Thank you in advance.

Have you looked into using the RandomItem formula function?
It can return a random row from a table.

If you want to include only some rows in the table, you can first use the Filter formula.

Sometimes I use a hidden relation control, and a button that picks a random row and saves that value in the relation control. Then I filter stuff based on the relation control.

If you want the random item to update on a time interval, you could use an automation that runs on a schedule and clicks the button.

1 Like

Hello Kuovonne,

Thank you for the tip. I tried, but it dosen’t work or maybe I’m doing something wrong.