For loop and a random variable

In reply to dave_59:

In reply to syed taahir ahmed:
You still didn’t show the declarations of all variables in the code. But I think replacing

entry_add_index = $urandom_range(0,($size(test_entries_add)-1));

with

void'(randomize (entry_add_index) with {
entry_add_index <$size(test_entries_add);
unique {entry_add_index,test_entries_added};
});

should work.

HI Dave ,

One doubt i have with the implementation, since there is condition the number of entry_add_index to be added will be count of $size(test_entries_add).

The query was if the sa_entry_row get a value 5 and we have only 3 entries to be added then the randomization will fail for unique? if i understand correctly.

Thanks