whoami 26 Posted October 30, 2013 Report Share Posted October 30, 2013 Hi guys..Im trying to create a logic: Im trying to compare between 2 lists..One list is loaded everytime the program opens, and that list is being used as reference for logs.Im logging data like usernames so we dont repeat interactions. So technically I need to compare list1 with list2 (fresh and recent)So if data in list2 exist in list1, then ignore an action. Else then perform action required. Really struggling with this. Quote Link to post Share on other sites
Steve 30 Posted October 30, 2013 Report Share Posted October 30, 2013 I think there are 2 things you can do to accomplish what you want... You can either subtract the lists so you only get unique records by doing something like this: add list to list(%uniquelist, $subtract lists(%list1, %list2), "Delete", "Global") or, you can check the list as you go like this: add item to list(%list1, "test", "Delete", "Global") add item to list(%list2, "test", "Delete", "Global") set list position(%list1, 0) set(#current_item, $next list item(%list1), "Global") if($contains(%list2, #current_item)) { then { alert("list 2 contains item from list 1") } else { alert("perform action required") } } Quote Link to post Share on other sites
whoami 26 Posted October 30, 2013 Author Report Share Posted October 30, 2013 Hey thanks! Just read it, I will analyze that logic inside my program and let you know how it went Quote Link to post Share on other sites
Steve 30 Posted October 30, 2013 Report Share Posted October 30, 2013 Hey thanks! Just read it, I will analyze that logic inside my program and let you know how it went No prob. 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.