Contact Us

Let us know to help you out quickly!

 Bharat Patel     Feb,08 2017

Remove duplicate elements from the list using coldfusion

Hi All,

List’s function is very useful in ColdFusion technology. We often use lists in our code but sometime we find duplicate elements in the list and we need to remove it. Here is the simple function to remove duplicate elements from list. Have a look at below code I hope it will helpful for you.

	function removeDuplicateFromList(lst,delim){
	var Lst2 = '';
	value = ListGetAt(lst,i);
	if(not ListFindNoCase(Lst2,value)){
	Lst2 = ListAppend(Lst2,value,delim);
	return Lst2;