saifee 1 Posted June 19, 2016 Report Share Posted June 19, 2016 A list has 100 names Is there a single command to select just 10 random names from this list? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 19, 2016 Report Share Posted June 19, 2016 $random list item - but you may get duplicates and so it would take more than one line to do what you want if that's what you're asking, here is one way to do it, keep in mind when adding single list items that you (most likely) want to select "delete duplicates". clear list(%numbers) clear list(%ten_numbers) set(#num,0,"Global") loop(100) { increment(#num) add item to list(%numbers,#num,"Don\'t Delete","Global") } loop while($comparison($list total(%ten_numbers),"< Less than",10)) { add item to list(%ten_numbers,$random list item(%numbers),"Delete","Global") } Quote Link to post Share on other sites
saifee 1 Posted June 19, 2016 Author Report Share Posted June 19, 2016 Thanks very much. This solved my issue 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.