This will count the fields, list the fields and tell you the value of the
fields.
<CFSET Count = 0>
<CFLOOP INDEX="i" LIST="#FORM.FieldNames#">
<CFSET Count = Count + 1>
<CFOUTPUT>#i# - #Evaluate(i)#</CFOUTPUT><P>
</CFLOOP>
<CFOUTPUT>#Count#</CFCOUNT>
Dave
----- Original Message -----
From: "Michael Wolter" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, August 09, 2001 9:33 AM
Subject: counting form fields
> Is there any way to get a count of the number of fields that are returned
> from a form?
>
> Also, is there a way to get a count of the number of records selected by a
> cfquery? The only way I have found to do that is to do a second cfquery
> and use the "count(*)" function, but that seems to be double the work.
> In Visual Basic, I can just put ".recordcount" after the recordset name to
> get a count. Does Cold Fusion have anything like that?
>
> Thanks!
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> | Michael Wolter [EMAIL PROTECTED] |
> | Administrative Programmer/Analyst Carlisle, PA 17013 |
> | Dickinson College, Computer Services (717) 245-1527 |
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists