I have two lists that I want to compare to one another and create a third list(needToEmailList) if an id from the first list(successfulID) isn't found in the second list(emailList)...This is what I have so far....I know I currently have a listfind, but was wondering if it is found, do I then use listdeleteat or is there a better method for what I want to do?
<cfset successfulID = valuelist(getSuccessful.prospectID)>
<cfset emailList = valuelist(getEmailed.prospectID)>
<cfset needToEmailList = "">
<cfloop list="emailList" index="i">
<cfif listfind(successfulID, #i#)>
<cfset needToEmailList = listAppend(needToEmailList, #i#)>