Constraint for randomization

In reply to Chandra Bhushan Singh:
creating new object actually.

can you tell way to do that for the one with different object and also for randomizing same object.