<!--- This example shows ListSetAt --->
<HTML>
<HEAD>
<TITLE>ListSetAt Example</TITLE>
</HEAD>

<BASEFONT FACE="Arial, Helvetica" SIZE=2>
<BODY  bgcolor="#FFFFD5">
<H3>ListSetAt 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.Subject)>
<!--- loop through the list and show it with ListGetAt --->
<H3>This is a list of <CFOUTPUT>#ListLen(temp)#</CFOUTPUT>
subjects posted in messages.</H3>

<CFSET ChangedItem = ListGetAt(temp, 2, ",")>
<CFSET TempToo = ListSetAt(temp, 2, "I changed this subject", ",")>
<UL>
<CFLOOP FROM="1" TO="#ListLen(temptoo)#" INDEX="Counter">
	<CFOUTPUT><LI>(#Counter#) SUBJECT: #ListGetAt(temptoo, Counter)#</CFOUTPUT>
</CFLOOP>
</UL>
<P>Note that item 2, "<CFOUTPUT>#changedItem#</CFOUTPUT>", has
been altered to "I changed this subject" using ListSetAt.

</BODY>
</HTML>       
      
