Hi Steven
Perhaps you can create a random integer (round(random()*{numberOfObjects})), where numberOfObjects is the number of objects of that entity in the database. You can then use this number to retrieve the random object with a custom range:
Seems a little bit strange, but I do not know another way to do it
See following Marketplace module ‘Random object’, which solves this issue by implementing (a simple) Java action:
https://marketplace.mendix.com/link/component/118958