Skip to main content
All CollectionsTroubleshooting
Why does the random operator return the same results each time?
Why does the random operator return the same results each time?
Updated over 11 months ago

When using a random sorting function you may notice that you're getting the same results each time. This is because Bubble caches the results of the first sorting order (meaning the results that were returned the first time you ran the random function within the same action or workflow).

To work around this, you can tweak your search queries slightly to 'break' this cache. For instance, you can add a simple, varying condition to each search, such as “id <> random_value,” where "random_value" changes with each search. This small change won't affect the essence of your search but will help in fetching genuinely random results each time.

Did this answer your question?