looks like you have 2 loops

1-3
   1-10

in the inner loop change the from and to to the next batch values
<cfset numPerLoop=10>
<cfloop index="outerLoop" from="1" to="3">
    <cfset nextCounter=((outerLoop-1)*numPerLoop)+1>
    <cfloop index="innerLoop" from="#nextCounter#"
to="#nextCounter+numPerLoop#">
    <cfoutput>#innerLoop#</cfoutput>
    </cfloop>
</cfloop>

On 6/13/06, Nick Sweeney <[EMAIL PROTECTED]> wrote:
> You could always run a counter - <cfset count = 1>
>
> And as you loop - just add 1 to it - <cfset count = count+1>
>
> So your question number is just #count# and not the actual saved number in
> the DB.....
>
> -N
>
>
> -----Original Message-----
> From: Torrent Girl [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 13, 2006 2:19 PM
> To: CF-Newbie
> Subject: Looping issue
>
>
> Hello All.
>
> I am having an issue with looping
>
> Here is my scenerio:
>
> My users tells me how many locations his/her business has.
>
> I loop over that number and display a series of questions for that
> location...so if the user enters 2 for the number of locations, I do this:
>
> <cfloop from="1" to="#locationCount#" index="i">...
>
> and display 2 set of questions.
>
>
>
> Here is my issue.
>
> The questions that I display are numbered from 1-10. That works well on the
> first set, but the second set needs to be numbered from 11-20 and I don't
> know how to make the loop jump to the next set of 10 numbers based on how
> many locations they choose.
>
> So, if they enter 3 locations I need 1-10, 11-20, 21-30
>
> BUT as I have it now, all questions from the three locations are labled
> 1-10.
>
> I hope this makes sense and please send your suggestions.
>
>
> tGirl
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1870
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to