> I know this is a basic question, but how do you set the delimiter
> to something besides a comma when using Valuelist?  I am running
> through a list of text descriptions that include commas, and when
> using Listgetat to get value, CF is parsing my internal commas as
> well. The CF documentation indicates a delimiter is an argument,
> but I can't seem to make it work.

This works for me:

<CFQUERY NAME="getstuff" DATASOURCE="cfexamples">
        SELECT  strFname,
                        strLname
        FROM    tblEmp
</CFQUERY>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
        <title>ValueList demonstration</title>
</head>

<body>

<CFSET mylist = ValueList(getstuff.strLname, Chr(7))>

<CFLOOP INDEX="i" LIST="#mylist#" DELIMITERS="#Chr(7)#">
        <CFOUTPUT>#i#</CFOUTPUT><br>
</CFLOOP>

</body>
</html>

You'll notice I'm using Chr(7) as my delimiter. It's the ASCII bell
character, which is non-printable, making it a good delimiter, since it's
unlikely that anyone will have typed it in the data.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to