I have a list of rows and I need to remove duplicates. I tried several things, for example:
Unfortunately, none of them worked. I'm really not sure what is going on. Therefore any help would be appreciated.
I am currently using the free ColdFusion 10 version for developers if this affects things.
List example:
lacunar_DM, Homocysteine, HTN, tobacco, indefinite, Lacunar_DM, homocysteine, tobacco
This was created by adding a static list with dynamic pulling from the database:
<cfsavecontent variable= "lacunar_list"> lacunar_DM, Homocysteine, HTN, Tobacco, undetermined </cfsavecontent> <cfset combination = ListAppend(lacunar_list, lacunar)> <cfoutput> List before removing dups: #combination#<br/> List after removing dups: #listremoveduplicates(combination, ",", true)#<br/> </cfoutput>
Here are the results:
The list before deleting duplicates:
lacunar_DM, Homocysteine, HTN, tobacco, indefinite, Lacunar_DM, homocysteine, tobacco
The list after removing duplicates:
lacunar_DM, Homocysteine, HTN, tobacco, indefinite, Lacunar_DM, homocysteine, tobacco