Returns the first element of the list.
See also ListGetAt, ListLast, and ListQualify.
ListFirst(list [, delimiters ])
List whose first element is being retrieved.
Set of delimiters used in list.
<!--- This example shows ListFirst, ListLast, and ListRest ---> <HTML> <HEAD> <TITLE>ListFirst Example</TITLE> </HEAD> <BODY> <H3>ListFirst Example</H3> <!--- Find a list of users who wrote messages ---> <CFQUERY NAME="GetMessageUser" DATASOURCE="cfsnippets"> SELECT Username, Subject, Posted FROM Messages </CFQUERY> <CFSET temp = ValueList(GetMessageUser.Username)> <!--- Show the first user in the list ---> <P>The first user in the list is <CFOUTPUT>#ListFirst(temp)# </CFOUTPUT>. <P>The rest of the users in the list is as follows: <CFOUTPUT>#ListRest(temp)#</CFOUTPUT>. <P>The last user in the list is <CFOUTPUT>#ListLast(temp)#</CFOUTPUT> </BODY> </HTML>