MACROMEDIA COLFUSION MX 7-CFML Reference page 710

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

ListAppend
Description
Concatenates a list or element to a list.
Returns
A copy of the list
Category
List functions
Function syntax
ListAppend(list, value [, delimiters ])
See also
,
ListPrepend
ListInsertAt
ColdFusion Variables," in ColdFusion MX Developer's Guide
Parameters
Parameter
list
value
delimiters
Usage
ColdFusion inserts a delimiter character before value.
The following table shows examples of
Statement
ListAppend('elem1,elem2', '' )
ListAppend('', 'elem1,elem2' )
ListAppend
("one___two", "three",
"___")
Example
<h3>ListAppend Example</h3>
<!--- First, query to get some values for our list elements--->
<cfquery name = "GetParkInfo" datasource = "cfdocexamples">
SELECT PARKNAME,CITY,STATE
FROM PARKS WHERE PARKNAME LIKE 'AL%'
</cfquery>
<cfset temp = ValueList(GetParkInfo.ParkName)>
710
Chapter 3: ColdFusion Functions
with value appended. If
,
,
ListGetAt
Description
A list or a variable that contains one.
An element or a list of elements.
A string or a variable that contains one. Character(s) that separate list elements.
The default value is comma.
If this parameter contains more than one character, ColdFusion uses only the first
character.
Output
elem1,elem2,
elem1,elem2
"one___two_three" Inserted the first character of
, returns a copy of the list, unchanged.
delimiter = ""
,
,
ListLast
ListSetAt
processing:
ListAppend
Comment
Appended element is empty; delimiter is last
character in list; list length is 2.
List length is 2.
before "three."
; "Lists" in Chapter 3, "Using
delimiters

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents