You push your available items to a global list. The list contains an expression field called as “myOrder” which you set to dynamic. The expression set a random value for example
duniform(0,1, getstream(current))
If you want to get 50 items you pull 50 of the global list
WHERE myOrder > 0
You find the pulled items in an result array. Please look into the Manual FlexScript Class Reference Array to get an reference to an item for example by pop, shift or splice.
Maybe you want to vary the amount then you can pull by a statistical distribution like duniform
duniform(41,50,3)
for a random range between 41 to 50.
The list must contain a really large number of entries (items) that you can get a complete order of 50 items. If you can’t get a total of 50 items you can repeat the pull several times with a smaller items to pull.
An alternative approach consists of a different evaluation of the list. Your entry expression contains random dynamic values that you use to order the list by this value ASCending or DESCending and you just pull 50 values without any WHERE filter.