Yes, you can do conditional loops.
Check the docs
http://127.0.0.1/cfdocs/CFML_Language_Reference/2_ColdFusion_Tags/lr2_054..htm
Example from docs:
The following example increments the parameter "CountVar" from 1 to 5. The results
look exactly like the Index loop example.
<!--- Set the variable CountVar to 0 --->
<CFSET CountVar=0>
<!--- Loop until CountVar = 5 --->
<CFLOOP CONDITION="CountVar LESS THAN OR EQUAL TO 5">
<CFSET CountVar=CountVar + 1>
The loop index is <CFOUTPUT>#CountVar#</CFOUTPUT>.<BR>
</CFLOOP>
The result of this loop in a browser would look something like:
The loop index is 1.
The loop index is 2.
The loop index is 3.
The loop index is 4.
The loop index is 5.
---mark
--------------------------------------------------------------
Mark Warrick
Phone: (714) 547-5386
Fax: (714) 972-2181
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--------------------------------------------------------------
> -----Original Message-----
> From: Ruslan Sivak [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 16, 2001 2:10 PM
> To: CF-Talk
> Subject: Conditional loops
>
>
> Is there a way to have conditional loops such as
>
> <CFIF something>
> <CFLOOP parameters1>
> <CFELSE>
> <CFLOOP parameters2>
> </CFIF>
>
> </CFLOOP>
>
> Ruslan Sivak
> Technologist
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists