I’m not sure if I’m missing something but can anyone confirm whether you can run a query and select the sort type as random? I’m not seeing this option.
What’s your use case for this? I guess if you’re displaying it on the front end, then you can sort randomly on the front end?
Ok, if that’s the only way… With this method I have to set a large query limit to make it work as intended because it only randomizes the queried items according to that limit.
I find it strange that the query function allows sort by table order but neglects random. This means we actually have to set the sort twice to achieve what we want. Weird.
I forgot to reply to this part. It is for a collection of suggested products that I include at the bottom of a certain product’s detail screen. The query enables me to avoid suggesting the same item that is shown on this detailed screen but in “Sort By” I want to choose “Random”, which is strangely omitted from the options.
Couldn’t you skip the query and directly show a limited collection sorted randomly? You can set a filter to not show the current screen item. I think the query is unnecessary in your case.
Or you could use a relation is instead, which has less overhead, and still handle your sorting and filtering on the front end.
I didn’t see this filter option? Where do I set it?
Are you showing the filter for the collection? Are you trying the set the first or second part of the filter?
Even when I test with another collection to add 1 filter, I still do not see the option to filter by screen. Are we looking at different types of screens?
I can’t tell by your previous screenshots, but in your latest screenshot, you aren’t looking in the right spot. You filter BY the screen value, so it would be the second part of the filter. For example, X is Screen>Y. In your screenshots your filters are looking for checked or not checked, so you don’t even have the second part of the filter opened up.
Ok, I found it! Thanks. Brain lapse
I can delete the query column
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.