CB 2.0.3: List sorting randomly

9 years 5 months ago #253947 by giecie
CB 2.0.3: List sorting randomly was created by giecie
CB 2.0.3
J3.3.6

How can I sort a CB list randomly on the field 'name'.
In CB1.9.1 I was able to select sort by: Sort Randomly [ASC].

How can I do this selection in CB2.0.3?
I think via ADVANCED and an SQL statement?
Can you give me an SQL examle?

Br.

Please Log in to join the conversation.

9 years 5 months ago #253949 by nant
Replied by nant on topic CB 2.0.3: List sorting randomly

giecie wrote: CB 2.0.3
J3.3.6

How can I sort a CB list randomly on the field 'name'.
In CB1.9.1 I was able to select sort by: Sort Randomly [ASC].

How can I do this selection in CB2.0.3?
I think via ADVANCED and an SQL statement?
Can you give me an SQL examle?

Br.


The internet is full of such examples ;-)

Here is one I found:

stackoverflow.com/questions/1117761/sql-query-to-return-rows-in-random-order

Based on this, your CB 2.0 userlist Sort tab Advanced setting should simply be:

RAND()

and you should get random listings.

Please Log in to join the conversation.

9 years 5 months ago #253952 by krileon
Replied by krileon on topic CB 2.0.3: List sorting randomly
Select "Random" under the "Recommended" sorting dropdown optgroup. Then select Ascending or Descending as desired.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: nant

Please Log in to join the conversation.

9 years 5 months ago #253954 by nant
Replied by nant on topic CB 2.0.3: List sorting randomly

krileon wrote: Select "Random" under the "Recommended" sorting dropdown optgroup. Then select Ascending or Descending as desired.


LOL - I also missed it - thanks Kyle!

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.300 seconds

Facebook Twitter LinkedIn