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.
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.
Thanks you so much…
I suspect however that the expression will randomly display 1-50 products.
If I had 100 products would it look like this? I’ve setup the RG to only display 20 so the limit is on the RG… would it work?
Ultimately the goal is to select 10,20,30 (which ever I set) randomly from a pool company products, lets say 200 that constantly change as the page is loaded.