dmbfan 9 Posted September 20, 2013 Report Share Posted September 20, 2013 I've been trying to solve this and just can't seem to figure out how: List 1 contains the values: Red, Blue, Green, Red, Yellow, Blue, Orange What I am trying to do is identify any duplicate value(s) in List 1 and save those value(s) to List 2 In the above example, List 2's values would then be: Red, Blue I am sure there is an easy way to do this, but I think lack of sleep is taking it's toll on me! Quote Link to post Share on other sites
UBotDev 276 Posted September 20, 2013 Report Share Posted September 20, 2013 You can do this:1st use two lists and add all values to both, but use different options (first list shouldn't "delete duplicates" set to YES and the second one to NO)2nd subtract the list without duplicates from original list, and you will get left with duplicates. Quote Link to post Share on other sites
giganut 109 Posted September 20, 2013 Report Share Posted September 20, 2013 I believe you could get the results you are looking for with $common list item Quote Link to post Share on other sites
dmbfan 9 Posted September 20, 2013 Author Report Share Posted September 20, 2013 You can do this:1st use two lists and add all values to both, but use different options (first list shouldn't "delete duplicates" set to YES and the second one to NO)2nd subtract the list without duplicates from original list, and you will get left with duplicates.This was the exact approach I was trying, but it looks like subtract lists subtracts all instances of the duplicate values so it removes all Reds and Blues from the first list and not just one instance of them. I keep getting an empty list as a result... I also played around with common list items using the above approach of creating the multiple files but can't think of a way to make that work because I think that will only returns the non-duplicate items and excluding the ones I actually want. Quote Link to post Share on other sites
giganut 109 Posted September 20, 2013 Report Share Posted September 20, 2013 Take a look at TJ's video about filtering lists, this my help you https://www.botguru.net/ubot-studio-tutorials/filtering-lists-remove-from-list-ubot-studio-v4/ 1 Quote Link to post Share on other sites
dmbfan 9 Posted September 20, 2013 Author Report Share Posted September 20, 2013 Take a look at TJ's video about filtering lists, this my help you https://www.botguru.net/ubot-studio-tutorials/filtering-lists-remove-from-list-ubot-studio-v4/Thanks, I think this is the approach that I need to take! The common list item approach above returns a list of just the unique common items without duplicates of those values. Thanks again. I may get to sleep tonight afterall! 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.