How can I build a random data display generator?


I have a database of questions. I would like to build something fairly simple: user clicks on button, a question of this database is displayed, user clicks on button again, another question of this database is displayed, etc.

I am not sure how to go about it. Any ideas? :nerd_face:

Hi there, @sophspages… here is one way to do it…

Put a group on the page, set your questions data type as the Type of content for the group, and set the Data source as Search for Questions:random item (where Questions is the name of your questions data type).

Then, put a button and a text element into the group. Set the text element to display the Parent group's Question's question (where question is the name of the field in the Questions data type where the text of the question is being stored).

Finally, add a workflow to the button and select the Element actions >> Display data action. For the Element, select the name of your group, and for the Data to display, use the same search that you used for the group (i.e., Search for Questions:random item).

Will it be truly random (whatever that means)? Probably not. Will it repeat questions unless you do more work to make sure it doesn’t? Yup, it sure will. But it’s a start, and if you just need something simple, it might get you going down a path.

Hope this helps.



Hello @mikeloc thank you soooooo much!! That was super clear and here is my little question prompts generator app :star_struck: Could not do it without you!!

1 Like