Determines whether that index exists in the given list or not
listIndexExists(list, index [, delimiter] [, includeEmptyFields])
→ returns boolean
list.listIndexExists(index [, delimiter] [, includeEmptyFields])
,
Check whether the index is exists or not in list
<cfset list="Apple,Orange,Banana,Graphs">
<cfif listIndexExists(list,2)>
<cfset list=listsetAt(list,2,"Goa")>
</cfif>
<cfoutput>#list#</cfoutput>
Expected Result: Apple,Goa,Banana,Graphs
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.