Is there an easier method to finding an exact match to a list then combining predicates?
I have shortened the list for testing purposes…
This is where I’m at and I would prefer to find exact match of the list instead.
use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use scripting additions
set theListOfLists to {{"A", "Upland Camo", "", "Richardson"}, {"ARB", "Arctic Blue", "PMS 2925 C", "ascolour"}, {"AZB", "Azure Blue", "PMS 2171 C", "Cotton Heritage"}, {"AB", "Aruba Blue", "", "Richardson"}, {"ABBI", "Split Aruba Blue/Birch", "", "Richardson"}, {"ABNKH", "Alternate Brown/Khaki", "", "Richardson"}, {"ACHHG", "Alternate Charcoal/Heather Grey", "", "Richardson"}, {"AGA", "Agave", "PMS 2178 C", "Cotton Heritage"}, {"AGB", "Alternate Gold/Black", "", "Richardson"}, {"AGN", "Troutdale Split Amber Gold/Navy", "", "Richardson"}, {"AGN", "Alternate Gold/Navy", "", "Richardson"}}
set theFilter to {"AGA", "Agave", "PMS 2178 C", "Cotton Heritage"}
set thePreds to {}
repeat with each in theFilter
set end of thePreds to (current application's NSPredicate's predicateWithFormat:" (self CONTAINS %@)" argumentArray:{each})
end repeat
set theArray to (current application's NSArray's arrayWithArray:theListOfLists)
set theListOfLists to (theArray's filteredArrayUsingPredicate:(current application's NSCompoundPredicate's andPredicateWithSubpredicates:thePreds)) as list