DMXzone App Connect Support Product Page

Answered

Random Sort

Asked 01 Sep 2017 04:33:24
1
has this question
01 Sep 2017 04:33:24 Brad Lawryk posted:
How do you sort a recordset randomly?

Replies

Replied 01 Sep 2017 07:11:50
01 Sep 2017 07:11:50 Teodor Kuduschiev replied:
Hello Brad,
Just use the randomize filter for your data source:
Replied 01 Sep 2017 15:41:50
01 Sep 2017 15:41:50 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 01 Sep 2017 15:52:02
01 Sep 2017 15:52:02 Brad Lawryk replied:
So I have to set up a repeat region even if I only need one record?
Replied 01 Sep 2017 16:06:26
01 Sep 2017 16:06:26 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 01 Sep 2017 16:56:45
01 Sep 2017 16:56:45 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 01 Sep 2017 17:12:01
01 Sep 2017 17:12:01 Brad Lawryk replied:
That worked. Thank you.

Reply to this topic