DMXzone App Connect Support Product Page

Answered

Random Sort

7 years ago Brad Lawryk posted:
How do you sort a recordset randomly?

Replies

Replied 7 years ago
7 years ago Teodor Kuduschiev replied:
Hello Brad,
Just use the randomize filter for your data source:
Replied 7 years ago
7 years ago Brad Lawryk replied:
I just have a simple recordset. No way to get to the Data Bindings panel you have in the screen shot. I just simply need to display one random record from a recordset.
Replied 7 years ago
7 years ago Brad Lawryk replied:
So I have to set up a repeat region even if I only need one record?
Replied 7 years ago
7 years ago Brad Lawryk replied:
So it seems the only way to display a random record is to create a repeat region. However ...

If I create a normal query there is no way to limit the number of records displayed so it shows all records in random order.

If I create a paged query and set limit to one it always displays the first record. If I set the limit to 2 it displays the first two records in random order. It doesn't select from all the records.

Has to be a better way?
Replied 7 years ago
7 years ago Teodor Kuduschiev replied:
Hi Brad,
Yes you need a repeat region. Add the random filter to it and then add the 'top' filter select one record..
Replied 7 years ago
7 years ago Brad Lawryk replied:
That worked. Thank you.

Reply to this topic