Is there a way to pick out one or more random records from a BO? For example :
BO1 - Customer :
Name (text)
RandomGift (text)
Status (text)
BO2 - Gift
GiftName (text)
BO3 - APIResult
Name (text)
GiftName (text)
Conceptually I need to do this kind of thing :
FIND BO1 WHERE BO1.Status='ProcessMe' TAKE BEST 100
CREATE BO3 FOR EACH BO1 WITH BO3.Name=BO1.Name, BO3.GiftName=[b]A_RANDOM(BO2.GiftName)[/b]
BO1.Status='Processed'
The process is run from a REST API call, and BO3 is returned as a JSON string.
Each run of the process would generate a random gift to each Customer, even if the same customer was rerun by having its status reset to 1 (so there is no relationship before or afterwards between Customer & Gift).
Also, there may not be as many BO2 instances as BO1, meaning some will inevitably double up. In fact, BO1 is going to be in the millions and BO2 will probably be a few hundred, maybe less in some cases.
Does any of that make sense?