I have a list of integers from 1 to 100 and i want 30 random numbers from that list how can we do this?
Discussion posts and replies are publicly visible
tointeger(rand(30)*100)
Sometimes it gives duplicates, you want duplicates to be removed too??
thanks for your response, i want to duplicate to be removed too.
I think stefan got the answer for your question.
Look into this thread,
PreetikA15
Just replace the enumerate to 30 instead of 15. Below is the same code what Stefan has mentioned.
a!localVariables( local!vals: tointeger(rand(100) * 50), index( union(local!vals, local!vals), enumerate(30) + 1, null ) )