Copy link to clipboard
Copied
Help – been up all night and brain is flat…
I have a text list, which I need to compare with n-amount of other lists. IE:
Original list: “beer, whisky, wine, vodka, tequila”
Then I have:
List 2: “beer, chocolate, nuts”
List 3: “whisky, bacon, beer”
List 4: “chocolate, bacon”
Etc…
I need a script that compares my original list with list 2, 3 & n, and return the list number that matches ANY of the list elements. IE my result set would be “2, 3”. (the ID of the lists returned as a valuelist)
Bonus point if you can arrange them by the amount of matches – “3, 2” – but non-essential.
Point me in the right direction please!
Copy link to clipboard
Copied
I would suggest starting out at cflib.org and do a search for "list"--there are a billion ready-made scripts for comparing/parsing/transforming lists that, while they may not knock out your solution in one fell swoop, will at the very least get you started in the right direction.
Copy link to clipboard
Copied
Try this link
http://ppshein.wordpress.com/2010/06/16/compare-list-in-coldfusion/
as it returns a matching list, you can work out the number of matches per list too...
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more