Alphabetical List of ColdFusion Functions
ListSetAt
Description
Returns list with value assigned to its element at specified position.
Category
List functions
ListSetAt(list, position, value [, delimiters ])
Syntax
See also
ListDeleteAt, ListGetAt,
Parameters
Parameter
list
position
value
delimiters
Usage
When assigning an element to a list, ColdFusion inserts a delimiter. If delimiters
contains more than one delimiter, ColdFusion defaults to the first delimiter in the
string, or a comma, if delimiters was omitted.
If you intend to use list functions on strings that are delimited by the conjunction ", "
(comma-space), as is common in HTTP header strings such as the COOKIE header,
we recommend that you specify delimiters to include both comma and space,
because ColdFusion Server does not skip white space.
Note
ColdFusion ignores empty list elements; thus, a list that is defined as "a,b,c,,,d" is
treated as a four element list.
Example
<!--- This example shows ListSetAt --->
<html>
<head>
<title>ListSetAt Example</title>
</head>
<body>
<H3>ListSetAt Example</H3>
<!--- Find a list of users who wrote messages --->
<cfquery name = "GetMessageUser" datasource = "cfsnippets">
SELECT Username, Subject, Posted
FROM
</cfquery>
<cfset temp = ValueList(GetMessageUser.Subject)>
Description
A list.
A position. The first position in a list is denoted by the number 1.
A value.
Set of delimiters.
Messages
ListInsertAt
503
Need help?
Do you have a question about the COLDFUSION 5 - CFML and is the answer not in the manual?
Questions and answers