In reply to syed taahir ahmed:
It would really help to show the declarations of all variables involved and what they represent.
From what I can figure out, you should be using constraints.
randomize (entry_add_index) with {
entry_add_index <$size(test_entries_add);
unique {entry_add_index,test_entries_added};
}