Structkeylist - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

StructKeyList

Description
Extracts keys from a ColdFusion structure.
Returns
A list of keys; if structure does not exist, ColdFusion throws an exception.
Category
Structure functions
Function syntax
StructKeyList(structure [, delimiter])
See also
Structure functions
Parameters
Parameter
structure
delimiter
Usage
A structure's keys are unordered.
Example
<!--- This example shows how to use StructKeyList to list the keys
in a structure. It uses StructNew function to create structure
and fills it with information user enters in form fields. --->
<!--- This section creates structure and checks whether Submit has been
pressed.
If so, code defines fields in the employee structure with what the
user entered in the form. --->
<cfset employee = StructNew()>
<cfif Isdefined("Form.Submit")>
<cfif Form.Submit is "OK">
<cfset employee.firstname = FORM.firstname>
<cfset employee.lastname = FORM.lastname>
<cfset employee.email = FORM.email>
<cfset employee.phone = FORM.phone>
<cfset employee.company = FORM.company>
<cfelseIf Form.Submit is "Clear">
<cfset rc = StructClear(employee)>
</cfif>
</cfif>
<html>
<head>
<title>StructKeyList Function</title>
</head>
<body>
<h3>StructKeyList Function</h3>
<h3>Listing the Keys in the Employees Structure</h3>
<p>This example uses StructNew function to create structure "employee" that
supplies employee information. The fields are filled with the
contents of the following form.</p>
Description
Structure from which to extract a list of keys.
Optional. Character that separates keys in list. Default: comma.
StructKeyList
711

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents