ListFirst() - get the first element of a List
ListFirst.cfm
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ListFirst function example: how to get the first element of a List</title>
</head>
<body>
<h2 style="color:hotpink">ListFirst Function Example</h2>
<cfset ColorList="DimGray,DodgerBlue,FireBrick">
<cfoutput><b>ColorList: #ColorList#</b></cfoutput>
<br /><br />
<cfoutput><b>ColorList First Element: #ListFirst(ColorList,",")#</b></cfoutput>
</body>
</html>
- ListAppend() - add element at the end of a List
- ListFindNoCase() - find List element (case insensitive)
- ListGetAt() - get List element at a specified position
- ListLast() - get the last element of a list
- ListLen() - get total number of elements in a List
- ListSort() - sort List elements
- ValueList() - get a delimited List from an executed query