daniel goshen
Posts: 0
Joined: Sun Jul 20, 2014 6:48 am

Using the random function/feature for returned records

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

daniel goshen
Posts: 0
Joined: Sun Jul 20, 2014 6:48 am

Using the random function/feature for returned records

Do you need more detail?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Using the random function/feature for returned records

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.

daniel goshen
Posts: 0
Joined: Sun Jul 20, 2014 6:48 am

Using the random function/feature for returned records

Let me give them a try - thank you

Return to “Issues”