You need to sign in to do that
Don't have an account?
Need Help comparing two lists
I need some direction. I currently have two lists - one called upgrades and the other called serial number / upgrades. What I want my code to do is compare the values in the upgrades list with the values in the serial number / upgrades list. If a value on the upgrades list is found on the serial number / upgrades list then don't do anything. However, if a value on the upgrades list is NOT found on the serial number / upgrades list, then add that value to the serial number / upgrades list. Both lists are variable in size, meaning that they could have 1 value or as many as 40 values. How can I achieve this, with apex code preferably inside of a trigger?
UPGRADES SN/UPGRADES
UG-001 <-----compare This To all of these ----> UG-004
UG-001 This value found, don't add it again.
UG-002 <-- This value is not found here --> ---- So add it to SN/UPGRADE list.
UG-003 <-- This value is not found here --> ---- So add it to SN/UPGRADE list.
Any help would be appreciated.
Hi Bioscience Man,
Perhaps something like:
Hope this helps.
Rich.
All Answers
Hi Bioscience Man,
Perhaps something like:
Hope this helps.
Rich.
Rich,
Thanks for your suggestion. Your code snippet worked beautifully! Here is what I ended up with:
Kent