Returns the last element of the list.
See also ListGetAt and ListFirst.
ListLast(list [, delimiters ])
List whose last element is being retrieved.
Set of delimiters used in list.
<!--- This example shows ListFirst, ListLast, and ListRest ---> <HTML> <HEAD> <TITLE>ListLast Example</TITLE> </HEAD> <BASEFONT FACE="Arial, Helvetica" SIZE=2> <BODY bgcolor="#FFFFD5"> <H3>ListLast Example</H3> <!--- Find a list of users who wrote messages ---> <CFQUERY NAME="GetMessages" DATASOURCE="CFExpress"> SELECT Subject, Posted, Message FROM Messages </CFQUERY> <CFSET temp = ValueList(GetMessages.Message)> <!--- Show the first user in the list ---> <P>The first message in the list is <UL> <LI><CFOUTPUT>#ListFirst(temp)#</CFOUTPUT> </UL> <P>The rest of the messages are as follows: <UL> <li> <CFOUTPUT>#ListChangeDelims(ListRest(temp), "<li>")#</CFOUTPUT>. </UL> <P>The last message in the list is <UL> <LI><CFOUTPUT>#ListLast(temp)#</CFOUTPUT> </UL> </BODY> </HTML>