Update randomizer.php

For Issue #1 opened by @prashishh . Made functions to set PrimaryField.