Page 1 of 1

Using the random function/feature for returned records

Posted: Tue Jul 22, 2014 5:11 pm
by daniel goshen

i see another question, that I thought would help, but I don't quite understand the solution provided. In my app, I have a master/detail configuration set up.[view the QRcode below],User clicks on item in the first screen, on the second screen, a "contains" search is run on an array field that currently just has an array of numbers like 3, 9, 5, 2. [The variable/# is passed using an invisible label on the first screen] The search looks for say the #2 in all the records, if found, returns the specific rows. With the qry, the first 3 rows are always returned . I want to find all the records with #2, then randomly show 3 of them, so the same three are not always displayed.

Could i get some insight on how to accomplish this please?

Image


Using the random function/feature for returned records

Posted: Wed Jul 23, 2014 12:34 am
by daniel goshen

Do you need more detail?


Using the random function/feature for returned records

Posted: Wed Jul 23, 2014 5:01 am
by Yurii Orishchuk

Hi Daniel,

You can shuffle your javascript Array with shuffle function described here:

http://stackoverflow.com/questions/24...

Also if you want to do it for service and mapping you can use "Security generic context" for this goal. See details:

http://devcenter.appery.io/documentat...

Regars.


Using the random function/feature for returned records

Posted: Thu Jul 24, 2014 3:09 am
by daniel goshen

Let me give them a try - thank you