Hello I have a problem that I can not solve, I would like that each time we press the button it displays a sentence from the database but only once (basically that the sentence can not be repeated several times) until the page is reloaded
Hi there, @julien.lancelon… if I understand your post correctly, one way to go would be to create a custom state that holds a list of sentences, and add each sentence to the custom state when they are displayed in the group. Then, use the custom state as part of a filter/constraint on the group’s data source so that only sentences that are not already in the custom state are returned in the search, and display a random item from those remaining sentences.
Anyway, that’s one way to go, and I hope it helps.
If it helps, here is an example where I have a custom state on the index page called used sentences, and here is the filter on the group’s data source.
Oh, you might also need to do something if the search runs out of sentences to display, so just keep that in mind if that could happen with your use case.