How can i randomize the selection of rows in superbase tables when using queries

Database & APIs

Hi,

I'm new to Flutterflow and am trying to build a trivia game with Supabase to learn the platform. I have a table created in Supabase called question_pool with over 100 questions and I want to randomize the questions listed under the coloumn. What I'm trying to do is every time a user clicks the start trivia button i want to show random questions from the question pool table that i created in superbase.

Another feature that i want to add is to not show a question that I have already shown to the same user for a while. In this case, let's say for a week. So if someone can help me explain the steps to implement these two features in Flutterflow it'd be a great help and learning opportunity for me.

Please help with:

  1. Choosing random questions from the question_pool table in superbase

  2. Avoid question repetition for a period of time. For example, I don't want to show a question that the user has already read for about a week. After a week or for a period of 7 days, the question can be shown to the same user.

Thank you :)

What have you tried so far?

i've added the query and was able to get the question display but could not get it to randomize and always gets displayed in the same order

Did you check FlutterFlow's Documentation for this topic?
No
1
5 replies